Jump to content

Very basic question (applescript)


Recommended Posts

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

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 by Sebastian Daza
Link to comment

 

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...