RE: How to automatically acknowledge a dialog
RE: How to automatically acknowledge a dialog
- Subject: RE: How to automatically acknowledge a dialog
- From: Scott Babcock <email@hidden>
- Date: Thu, 31 May 2007 13:58:53 -0700
- Acceptlanguage: en-US
- Thread-topic: How to automatically acknowledge a dialog
Try an "ignoring application responses" block around your 'open' event:
ignoring application responses
tell application "Adobe Photoshop CS2"
open myFile
end tell
end ignoring
tell application "UserNotificationCenter" to activate
tell application "System Events" to keystroke "o"
The 'ignoring' block instructs AppleScript to throw the 'open' event to Photoshop and continue on immediately to the next instruction. There may be some synchronization issues to deal with here, but you shouldn't be blocked waiting for the 'open' event to finish, which will allow you to issue your keystroke.
-----Original Message-----
Date: Fri, 25 May 2007 00:13:04 -0700
From: "Patrik B." <email@hidden>
Subject: How to automatically acknowledge a dialog
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=iso-8859-1
I tried both variations and it didn't go anywhere.
In theory the system event should work with keystroke "o" as that is the key
that can be pushed to continue opening the file instead of pushing r for
reading composite data. However it never gets to the part of the script were
it pushes o. The script seems to wait for Photoshop to finish "opening the
file" and then pushes o however many times after the fact that the file is open.
In regards to "showing dialog never" - I tried this already and it didn't
work. Dialog still comes up. I guess it is a compatibility issue of CS3 and CS2.
I guess I'll fall back onto ikey or something or holding down o until done
each time.
Best, Patrik
> tell application "UserNotificationCenter"
> activate
> tell application "System Events" to keystroke ";" using
> {shift down, command down}
> end tell
> Try this and see if it works with your files:
> on open fileList
> repeat with myFile in fileList
> tell application "Adobe Photoshop CS2"
> open myFile showing dialogs never
> end tell
> end repeat
> end open
>
> HTH,
>
> ES
>
_______________________________________________
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