user interaction (& osascript/cron & System Events ) [was: 'ignoring application responses' stops working ??]
user interaction (& osascript/cron & System Events ) [was: 'ignoring application responses' stops working ??]
- Subject: user interaction (& osascript/cron & System Events ) [was: 'ignoring application responses' stops working ??]
- From: Steven Majewski <email@hidden>
- Date: Mon, 21 Jun 2004 18:36:31 -0400
An interesting side effect of telling System Events to display dialog
is that
osascript ( and cron ) can run the script without complaining about
'No user interaction allowed. (-1713)' .
[ No replies to my earlier message below -- I'ld still like to know
why it needs an initial call outside of the 'ignoring' block to prime
things! ]
-- Steve Majewski
On Jun 18, 2004, at 2:21 PM, Steven Majewski wrote:
I use the following fragment to asynchronously put up a message while
doing some other application scripting that takes 5 or 10 minutes:
ignoring application responses
tell application "System Events" to
display dialog "Building annotations text file
(this will take a while...)" buttons {"*"} default button 1 giving
up after 20
end ignoring
This worked perfectly when I was testing my script.
When I moved the script to another machine, everything else worked,
but the
dialog box failed to appear.
I went back to my machine and it also failed to work as before.
I tried a little poking around to see if it made a difference in how
the script
was run ( as an .app or from script editor -- No ) or if using
"Finder" instead
of "System Events" made a difference (NO) or if activating the app
first made
a diff. (NO).
What I did find is that if I first did a 'tell application' to display
dialog WITHOUT
the 'ignoring' clause, and then did it again within the ignoring
clause, it worked
just like it did before!
( And when I was originally testing that code fragment, I did run it
at least once
before I wrapped it in the 'ignoring' clause -- which explains why
it initially worked
with no problems! )
Has anybody else seen this or similar behavior ?
Is this a bug or a feature ?
-- Steve Majewski
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.