• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: JXA failure with delay function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JXA failure with delay function


  • Subject: Re: JXA failure with delay function
  • From: David Steinberg <email@hidden>
  • Date: Tue, 16 Jun 2015 17:48:43 -0700

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):

delay(3)

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:

delay 3

I hope that helps!

- David

On Jun 16, 2015, at 17:40, Paul Scott <email@hidden> wrote:

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

  • Prev by Date: Re: bizarre acrobat script problem
  • Next by Date: Re: JXA failure with delay function
  • Previous by thread: Re: bizarre acrobat script problem
  • Next by thread: Re: JXA failure with delay function
  • Index(es):
    • Date
    • Thread