Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

[CS3][JS] Is there a JS equivalent of AS 'ignore application responses'

Guest
Oct 03, 2008 Oct 03, 2008
I used 'ignoring application responses' a few times in AppleScript to speed up a script execution. Is there a Javascript equivalent. Curious.
TOPICS
Scripting
762
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 03, 2008 Oct 03, 2008
Yes, it's called "userInteractionLevel". Look under the "scriptPreferences".
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 04, 2008 Oct 04, 2008
Actually that isn't the same thing, try67, just in case you're interested. :)

AppleScript has 'user interaction level' in 'script preferences', too, but 'ignoring application responses' is not part of it. It is an AppleScript language thing and I was wondering if there was a Javascript equivalent. (For the curious, essentially 'ignoring application responses' will allow a series of commands to be sent without waiting for a return value from the application. Particularly useful if the return value is of no interest to your script as you can fire off a whole load of commands at the application and the script block will complete while the application is still processing your instructions.)

Question is still open if anyone can help.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 04, 2008 Oct 04, 2008
Sorry... then what is exactly "ignoring application responses"?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 04, 2008 Oct 04, 2008
Hi Simon,

I don't know of any JS equivalent, but it's not as big a deal there, as the overhead for processing the responses is much lower (compared to the massive overhead required for unpacking AppleEvents, at least).

I think that you'll find bigger performance gains in managing the undo queue by doing a save as every so often, or turning off undo through Rorohiko's plug-in (or, in CS4, disabling undo via doScript). Working with the window hidden can also produce some performance improvements.

Thanks,

Ole
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 05, 2008 Oct 05, 2008
> I think that you'll find bigger performance gains in managing the undo queue by doing a save as every so often, or turning off undo through Rorohiko's plug-in (or, in CS4, disabling undo via doScript). Working with the window hidden can also produce some performance improvements.
>
Hi Ole,

As best as I can tell, the only way to get those performance gains is to
actually clear the undo stack (either by "save as", or by using
Rorohiko's "Discard Undo" OpCode. Collapsing the undo stack either using
APID, or via doScript in CS4 (great new feature, by the way!) does not
actually clear the stack it just collapses the stack into one undo item
which doesn't help performance (it might even hurt performance
slightly). The whole collapsed stack is still retained in memory.

--
Harbs
http://www.in-tools.com
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 05, 2008 Oct 05, 2008
Hi Harbs,

I'm not actually sure how much detail I can get into on CS4 yet, but the problem with the undo queue is not that it's in memory, but that each action forces a disk write. My experience with CS4 is that performance with doScript is equivalent to the Rorohiko plug-in in CS3. Note that I'm not dismissing the Rorohiko plug-in--I think Chris does fantastic work!:-)

Thanks,

Ole
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 05, 2008 Oct 05, 2008
Hi Ole,

> I'm not actually sure how much detail I can get into on CS4 yet,
Why? Aren't we allowed to discuss it now that it's been announced?
> but the problem with the undo queue is not that it's in memory, but that each action forces a disk write.
Hmm. As best as my memory serves me, collapsing the stack doesn't help
performance. I guess I should do some testing with both APID and the CS4
doScript and see what I come up with...

--
Harbs
http://www.in-tools.com
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 05, 2008 Oct 05, 2008
LATEST
try67, from Apple: '[Ignoring application respones] Permits a script to continue without waiting for an application to respond to commands that target it.

'A response to an application command indicates whether the command completed successfully, and also returns results and error messages, if there are any. When you use an ignoring application responses block, you forego this information.

'Results and error messages from AppleScript commands, scripting additions, and expressions are not affected by the application responses attribute.'
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines