Re: photoshop File Info script. Photoshop bug?
Re: photoshop File Info script. Photoshop bug?
- Subject: Re: photoshop File Info script. Photoshop bug?
- From: Kelvin Aitken <email@hidden>
- Date: Fri, 15 Aug 2003 13:11:47 +1000
- Organization: Kelvin Aitken Photography
The problem is when it hits the line:
set docRef to the current document
The script then is supposed to go on to place text in the File Info of
the image. However the script finds an error in that line and stops with
the Event Log showing:
beep current document
end tell
Photoshop beeps and skips to saving and closing the image.
The next part of my script including the above is:
set docRef to the current document
tell current document
try
set properties of info to {title:myTitle, --etc.
which it does not do of course.
=============
My script in all it's glory is:
tell application "Finder"
set myFolder to choose folder
set myNewFolderName to the name of myFolder as string
set outputFolder to make new folder at myFolder with properties
{name:myNewFolderName}
set outputFolder to folder ((myFolder as string) & myNewFolderName)
set myFolderContents to every file of folder myFolder
repeat with x in myFolderContents
set y to the name of file (x as string)
set AppleScript's text item delimiters to "."
set w to the first text item of y
set AppleScript's text item delimiters to " "
set z to the second text item of w
set qq to x as alias
tell application "FileMaker Pro"
try
show (every record of database "My Database" whose cell
"Image ID" = z and cell "Dupe ID" = "00")
set myCaption to cell "Label" of the current record of
document "My Database"
set AppleScript's text item delimiters to ")"
set myTitle to the first text item of myCaption
if myTitle contains "(" then
set myTitle to myTitle & ")"
end if
set AppleScript's text item delimiters to ""
end try
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
end tell
end repeat
end tell
Maybe it is the line "set properties of info to {title: myTitle}" that is
actually causing the problem?
Kelvin.
Shane Stanley wrote:
On 15/8/03 12:36 PM +1000, Kelvin Aitken, email@hidden , wrote:
This is what the Event Log shows:
tell application "Photoshop.0"
activate
set display dialogs to never
close every document saving no
--> {}
open alias "Macintosh HD:Users:me:Desktop:zzz:F06A02 10663.jpg"
get current document
--> document "F06A02 10663.jpg"
OK, that's what it should return. Where does that go wrong?
_______________________________________________
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.