I need to create a script that automatically closes a popup box that opens approximately every 55 - 65 seconds. Once the box opens, you merely hit OK (within the box) and it closes.
I created an applescript application but found that I still need to hit manually run the script for it to work.
on idle tell application "XYZ" activate tell application "System Events" to key code 36 end tell return 65 end idle
- Instead of specifying a time, in this case 65 seconds, can I not say; if the dialog box opens click the OK button. In that way anytime the box opens, it will be closed without disturbing me whilst I work on the application.
- I'd really only like the script to be activated at the time, the window/popup shows up and not before.
- The script should be active, whilst I use the application (XYZ). How long I will use XYZ will vary.