0
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.
@Andy Error -1708 is usually because the AppleScript excution environment does not know what context to send/call the method to. The context is specified by "tell application XYZ" / end tell. Alternatively, you need to specify the keyword my in from of the function being called: my computeFilesMissing – David Andreoletti – 2015-09-20T23:39:13.447
Thanks for the feedback. Deleted other post.Made the following amendments:1. added in window 1 and I get an error - Can’t continue exists." number -1708 – Andy – 2013-11-26T12:05:25.173