Sebastian Daza Posted July 9, 2014 Share Posted July 9, 2014 I would like to create a workflow to control a very basic app: focus time (a pomodoro time tracking). I would like to start, stop, and pause my pomodoros, or change the project/task I am working on. The app has a menu but I don't how to control it using applescript. Do you have any resource to learn how to control an app using applescript and that doesn't have shortcuts for the actions I am interested? Thanks! Link to comment
Sebastian Daza Posted July 9, 2014 Author Share Posted July 9, 2014 (edited) In my case, when you don't have a dictionary for applescript, you can use something like this: tell application "System Events" tell process "Focus Time" tell menu bar 1 tell menu bar item "Timer" click tell menu 1 click menu item "Start" end tell end tell end tell end tell end tell Edited July 9, 2014 by Sebastian Daza Link to comment
jdfwarrior Posted July 10, 2014 Share Posted July 10, 2014 In my case, when you don't have a dictionary for applescript, you can use something like this: tell application "System Events" tell process "Focus Time" tell menu bar 1 tell menu bar item "Timer" click tell menu 1 click menu item "Start" end tell end tell end tell end tell end tell UI scripting in AppleScript isn't fun by any means. I don't know of any great AppleScript resources right off. Apple's online documentation may be a good place to start. Link to comment
dfay Posted July 10, 2014 Share Posted July 10, 2014 Two useful links for finding out what UI elements are available are: http://hints.macworld.com/article.php?story=20111208191312748 http://apple.stackexchange.com/questions/40436/how-to-know-the-name-of-ui-elements-using-accessibility-inspector-or-any-other Link to comment
Carlos-Sz Posted July 10, 2014 Share Posted July 10, 2014 An application like UI Browser may help you: http://www.macupdate.com/appnew/mac/34028/ui-browser Link to comment
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