|
|
I have a macro that simply serves as a "sleep" function for my audiobook player:
it waits for 20 minutes and then issues a <ctrl>P to pause the player. This way,
I can fall asleep to the audiobook and have it pause playing so that it doesn't
continue to play all night long.
The trouble is that sometimes I forget if I have already pressed the hot-key for
this macro (I turn off my laptop display, so can't see the macro running window).
I would like to have a way to determine if the macro is already running
at the beginning of the code and exit if so (or better yet, kill the older macro process
and initiate the new instance for a fresh 20 minute sleep period), but so far have
not found a way to do this. I have to have this macro run as a separate process,
so that may be limiting my choices for how to test to see if an instance is already
running. For instance, <shift><esc> at the beginning doesn't work, I assume because
the new macro is running in its own memory space (?).
Any ideas? I did try writing to the clipboard and testing it, but wasn't able to get
that to work either.
Thanks,
Dan |
IP Logged
|
|
Last Edited On: 11-07-2011 16:17:11 By dan.web.01@gmail.com for the Reason |