Re: saving a file in GraphicConverter
Re: saving a file in GraphicConverter
- Subject: Re: saving a file in GraphicConverter
- From: Joel Henriques <email@hidden>
- Date: Mon, 6 Jan 2003 08:56:02 -0800
woo hoo! That was it Rob. It works perfectly now. I had a feeling it
was something strange like that. Thanks for the help
everybody.....Cassj and Mr Tea....Super thanks.
joel
I haven't examined the script or followed this thread closely but I
thought I'd mention that some version(s) of GraphicConverter prior to
4.5 had a bug which caused problems when saving files in OS X.
property type_list : {"JPEG", "GIFf", "PICT", "TIFF"}
property extension_list : {"jpg", "jpeg", "gif", "pct", "pict", "tif",
"tiff"}
on open these_items
tell application "Finder"
activate
set theLoc to container of item 1 of these_items
set folderexists to (folder "JPEGs" of theLoc) exists
if folderexists is false then make new folder at theLoc with
properties {name:"JPEGs"}
set theDest to folder "JPEGs" of theLoc as alias
set itemcount to the count of these_items
repeat with i from 1 to itemcount
set this_item to item i of these_items
set validfiletype to (the file type of this_item is in the
type_list)
set validnameextension to the name extension of this_item is in the
extension_list
if validfiletype and validnameextension then -- else process next
file
set theName to the name of item i of these_items as string
set AppleScript's text item delimiters to "."
set theNewName to text item 1 of theName & ".jpg"
set validfiletype to (the file type of this_item is in the
type_list)
set validnameextension to the name extension of this_item is in
the extension_list
if validfiletype and validnameextension then
tell application "GraphicConverter"
activate
open this_item
set this_item to ((theDest as string) & theNewName)
save window 1 in this_item as JPEG with makeCopy
close window 1 saving no
end tell
end if
end if
end repeat
end tell
end open
_______________________________________________
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.