Re: photoshop File Info script. Photoshop bug?
Re: photoshop File Info script. Photoshop bug?
- Subject: Re: photoshop File Info script. Photoshop bug?
- From: Shane Stanley <email@hidden>
- Date: Fri, 15 Aug 2003 15:33:04 +1000
On 15/8/03 1:11 PM +1000, Kelvin Aitken, email@hidden, wrote:
>
tell application "Photoshop.0"
>
activate
>
set display dialogs to never
>
close every document saving no
>
open qq
>
set docRef to the current document
>
tell current document
>
try
>
set properties of info to {title:myTitle}
>
on error
>
beep
>
end try
>
set newFileName to (outputFolder as string)
>
save docRef in file newFileName as JPEG appending
>
lowercase extension
>
close docRef without saving
>
end tell
>
end tell
Your problem is that docRef and current document are the same thing, so when
you "save docRef in..." inside the "tell current document" construct, you're
trying to tell the document of the document. Same with your close. You don't
need docRef at all. Try it like this:
tell application "Photoshop.0"
activate
set display dialogs to never
close every document saving no
open qq
tell current document
try
set properties of info to {title:myTitle}
on error
beep
end try
set newFileName to (outputFolder as string)
save in file newFileName as JPEG appending
lowercase extension
close without saving
end tell
end tell
--
Shane Stanley, email@hidden
_______________________________________________
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.