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

(Windows) iTunes re-opening itself #12

Open
wxllow opened this issue Apr 23, 2022 · 5 comments
Open

(Windows) iTunes re-opening itself #12

wxllow opened this issue Apr 23, 2022 · 5 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@wxllow
Copy link
Owner

wxllow commented Apr 23, 2022

If you close iTunes while AppleMusicRP is running, it will reopen itself.

The code that handles this and causes this is here

@wxllow wxllow added bug Something isn't working help wanted Extra attention is needed labels Apr 23, 2022
@wxllow wxllow added this to the AppleMusicRP 4.0.0 milestone Apr 23, 2022
@wxllow wxllow added the good first issue Good for newcomers label Apr 27, 2022
@benjjvi
Copy link

benjjvi commented Jun 7, 2022

Was scrolling through GitHub and found this issue,

When integrating win32com to iTunes, it will always attempt to find that process, even if it is closed. This causes the effect of reopening the program.

Fixing it should be easy enough. Within the win32com documentation (should be) instructions on how to kill a dispatch hook. Simply killing it will make sure it doesn't spawn again. Implementation is as easy as setting a flag for hooking to iTunes for the first time since the program is ran, and then killing the win32com variable as soon as iTunes is not detected.

@wxllow
Copy link
Owner Author

wxllow commented Jun 8, 2022

Was scrolling through GitHub and found this issue,

When integrating win32com to iTunes, it will always attempt to find that process, even if it is closed. This causes the effect of reopening the program.

Fixing it should be easy enough. Within the win32com documentation (should be) instructions on how to kill a dispatch hook. Simply killing it will make sure it doesn't spawn again. Implementation is as easy as setting a flag for hooking to iTunes for the first time since the program is ran, and then killing the win32com variable as soon as iTunes is not detected.

Thank you for this! I'll try it soon

@benjjvi
Copy link

benjjvi commented Jun 11, 2022

Thank you for this! I'll try it soon

Any luck so far?

@pebxcvi
Copy link

pebxcvi commented Apr 15, 2023

on windows, you can kill the task with a simple vbs script.

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "taskkill /f /im AppleMusicRP.exe"

save as stopAppleMusicRP.vbs

@benjjvi
Copy link

benjjvi commented Apr 16, 2023

on windows, you can kill the task with a simple vbs script.

Set WshShell = CreateObject("WScript.Shell") WshShell.Run "taskkill /f /im AppleMusicRP.exe"

save as stopAppleMusicRP.vbs

that would be a good idea to bodge, but it would probably be easier to just implement it directly into the script. i haven't been here for a while as ive been working on my own version, but we use the same library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants