Adam Posted February 23, 2013 Posted February 23, 2013 Okie dokie, why isn't the query working in this? on alfred_script(q) tell application "Thyme" q end tell end alfred_script If I hard code the values start, stop, pause, toggle it works fine. The query is passed through to the post notification. Best way to debug something simple like this? Cheers, Adam
aiyo Posted February 23, 2013 Posted February 23, 2013 The variable q is a string, so you get this: tell application "Thyme" "start" end tell You can use if statements to achieve your goal: on alfred_script(q) tell application "Thyme" if q is "start" then start else if q is "stop" then stop else if q is "pause" then pause else toggle end if end tell end alfred_script Hope this helps you
Adam Posted February 23, 2013 Author Posted February 23, 2013 Brilliant. thanks Jonas. Despite all these years on a Mac I've not really bothered with Applescript yet! Cheers, Adam
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now