Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG REPORT] - The AutoPause.exe does not terminate when the Reset button is clicked #29

Closed
2 tasks done
amymor opened this issue Nov 17, 2023 · 4 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@amymor
Copy link
Contributor

amymor commented Nov 17, 2023

Description

The Reset button shuts down everything except autoPause.exe. I believe that including autoPause.exe in the Reset function would address the issue.

Off-topic, I have also modified autoPause to play video only when the desktop is active. As a result, when I select a window, the playback will pause. Here is the complete code if you're interested or would like to provide it as an additional version for users:

#NoTrayIcon

While 1
   $activeWindow = WinGetTitle("[ACTIVE]") ; Get the title of the active window
   If $activeWindow <> "" And $activeWindow <> "Desktop" Then ; If the active window is not the desktop
       ; Send the pause command to mpv
       Run(@ComSpec & " /c " & "echo set pause yes >\\.\pipe\mpvsocket", "", @SW_HIDE)
   Else
       ; Send the resume command to mpv
       Run(@ComSpec & " /c " & "echo set pause no >\\.\pipe\mpvsocket", "", @SW_HIDE)
   EndIf
   Sleep(1000) ; Check every second
WEnd

Steps to reproduce

  1. Open app and set something as background.
  2. Press the Reset button.

Windows version

Windows 10

Confirmation

  • I performed a search of the issue tracker to avoid opening a duplicate issue
  • I understand that not filling out this template correctly may lead to the issue being closed
@amymor amymor added the bug Something isn't working label Nov 17, 2023
@SegoCode
Copy link
Owner

Hey mate,

How about if you open a PR and add that alternative version as "autoPause_ActiveWindows" or something like that, I'll compile it and add it to the readme, so if someone wants that functionality to replace the .exe

@amymor
Copy link
Contributor Author

amymor commented Nov 18, 2023

While I'm not very familiar with GitHub, I submitted a pull request. Please let me know if there are any problems.

@SegoCode
Copy link
Owner

SegoCode commented Nov 18, 2023

While I'm not very familiar with GitHub, I submitted a pull request. Please let me know if there are any problems.

No worrys, perfect, #30 merged, feel free to create any pr, thx!

@SegoCode
Copy link
Owner

Fixed on 1.12!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants