Question
applescript photoshop open file delay
Hi,
I have a problem with photoshop and applescript. When I run the following simple applescript which opens a document and saves it in a location:
tell application "Adobe Photoshop CS3"
open picpathalias
-- delay 10 -- quite a long delay is needed
save current document in file regpicpath as JPEG
end tell
I often receive the following error:
Adobe Photoshop CS3 got an error: General Photoshop error occurred. This functionality may not be available in this version of Photoshop.
- The object current document is not currently available.
It seems there is a race between the open cmd and the save cmd. This most often happens when photoshop is not yet an open application. It almost never happens when photoshop is already open. Is there a programmatic way to make open block until the document is available?
Thanks.
-yang
I have a problem with photoshop and applescript. When I run the following simple applescript which opens a document and saves it in a location:
tell application "Adobe Photoshop CS3"
open picpathalias
-- delay 10 -- quite a long delay is needed
save current document in file regpicpath as JPEG
end tell
I often receive the following error:
Adobe Photoshop CS3 got an error: General Photoshop error occurred. This functionality may not be available in this version of Photoshop.
- The object current document is not currently available.
It seems there is a race between the open cmd and the save cmd. This most often happens when photoshop is not yet an open application. It almost never happens when photoshop is already open. Is there a programmatic way to make open block until the document is available?
Thanks.
-yang
