AppleScript support to stop playback

AppleScript support to stop playback

Postby spookyt » Fri Sep 11, 2009 11:10 am

Hi,
I use QuicKeys to play a pretty long "wakeup" sequence in the morning, but I would like to have the ability to interrupt that running sequence using another AppleScript.

In other words:
While a shortcut is running, how can I make QuicKeys stop that sequence (without keyboard/mouse, but using AppleScript).

a simple code like:

Code: Select all
tell application "QuicKeys"
stop playback
end tell

would be great. :D

Can you please add this to the feature request list?

PS: don't make me "kill QuicKeys" and restart the app using an external script :twisted:
spookyt
 
Posts: 5
Joined: Sun Oct 21, 2007 5:15 am

Re: AppleScript support to stop playback

Postby gb2 » Fri Sep 11, 2009 1:06 pm

QuicKeys 4 already has a shortcut step that is "Stop Playback", which you can assign a hot and press at anytime to stop the currently playing shortcut. You can call the same shortcut from AppleScript using this code if the shortcut is named "Stop Playback"

Code: Select all
tell application "QuicKeys"
play shortcut named "Stop Playback"
end tell
User avatar
gb2
Site Admin
 
Posts: 2875
Joined: Mon Feb 06, 2006 6:22 pm

Re: AppleScript support to stop playback

Postby spookyt » Fri Sep 11, 2009 1:28 pm

My understanding was that QuicKeys is only able to play one shortcut at the same time, isn't it?

Anyway your AppleScript works in a test, where I defined a second shortcut that contains a couple of longer "pause" steps. Here I can use your method to stop the test shortcut.

BUT the same thing does NOT work for my shortcut, in which there is currently running an "AppleScript step" . It seems to wait until the AppleScript step has been finished and until then is not executing the "stop playback" command. Using the Dock context menu, I can always stop the running "AppleScript step", but not via your script. Can you explain why? So that is not a solution so far.
I am using the latest version of QK.

Any other ideas how to solve that problem?

btw: my AppleScript step is a running so long, because it gradually increases the iTunes volume (taking 5 min.). I want to be able to interrupt that sequence.
spookyt
 
Posts: 5
Joined: Sun Oct 21, 2007 5:15 am

Re: AppleScript support to stop playback

Postby gb2 » Fri Sep 11, 2009 2:02 pm

yes QuicKeys only plays one shortcut at a time, the Stop Playback shortcut is special because it is able to be played at anytime so that it can stop the currently playing shortcut. My supply AppleScript would have to be run as a stand alone file not within QuicKeys. Please use the following link to Contact Support. I'll need to see exactly what your shortcut is doing. I'll reply and you can then attach the shortcut.
User avatar
gb2
Site Admin
 
Posts: 2875
Joined: Mon Feb 06, 2006 6:22 pm


Return to QKM Feature Requests

Who is online

Users browsing this forum: No registered users and 2 guests

cron