Re: Image Events
Re: Image Events
- Subject: Re: Image Events
- From: Yvan KOENIG <email@hidden>
- Date: Fri, 18 Aug 2006 18:33:47 +0200
Here is the odd handler with some changes.
tell application "Finder"
set EventFolder to "Macintosh
HD:Users:yvankoenig:Desktop:_X4958à4963ƒ:" as alias
set liste to (every file of EventFolder) as alias list
end tell
set SizeRequired to 400
my Resizethis(liste, SizeRequired, EventFolder)
on Resizethis(ResizeAliasList, SizeRequired, EventFolder)
tell application "Finder"
try
set LDFolder to (make new folder at EventFolder with properties
{name:"LD" & SizeRequired})
on error
set LDFolder to folder ("LD" & SizeRequired as string) of EventFolder
end try
end tell -- Finder
set NumberOfFiles to count of ResizeAliasList
repeat with onefile in ResizeAliasList
tell application "Finder" to set OneFileName to name of onefile as
text -- MODIFIED
set OneFileName to ("LD_" & OneFileName) as text
tell application "Image Events"
launch
set this_image to open onefile
scale this_image to size SizeRequired
set TheFinalFileString to (LDFolder as string) & OneFileName --
MODIFIED
save this_image in file TheFinalFileString with icon
close this_image
end tell
end repeat
end Resizethis
The first mod was introduced to tell to the script that we want to
put the Finder at work.
The second was necessary because the concatenation of an object of
class folder with a string generates an error.
Yvan KOENIG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden