I was wondering if there are any mouse click commands. I want to run an app I made if I click on its icon in the dock.
i believe this should work:
tell app "System Events" to click
Try something like this, bonedoc (after changing the name from ‘my_app’):
tell application "System Events" to tell process "Dock" to click UI element "my_app" of list 1
Incidentally, is there any reason why you can’t use something like this?
tell application "my_app" to activate