Hi Paul,
The delay command is a built-in command, not a standard addition. You are receiving the error: "Message not understood." because the application truly does not understand the delay command. It was documented in the standard additions scripting dictionary for reference before _javascript_ for Automation existed and remains there. This single line JXA script should work for you (even before El Capitan):
In AppleScript, the delay command is not actually sent to an application, but it is allowed in tell blocks and will be handled as a built-in command appropriately. This script:
tell current application delay 3 end tell
is equivalent to this script:
I hope that helps!
- David
Anyone running El Capitan yet?
Apple says the following JXA bug may be fixed in El Capitan. Can anyone verify that? I’m not in a position where I can install El Capitan Beta at this time.
Summary:
The standard additions "delay" method, when passed a _javascript_ number causes a script failure
Steps to Reproduce:
1. Input the following _javascript_ in Script Editor:
var app = Application.currentApplication();
app.includeStandardAdditions = true;
app.delay(3);
2. Run the script
Expected Results:
Script should terminate normally.
Actual Results:
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
|