My first modest attempt with image events
My first modest attempt with image events
- Subject: My first modest attempt with image events
- From: Michelle Steiner <email@hidden>
- Date: Mon, 27 Oct 2003 17:58:19 -0700
set foo to choose file default location alias ((path to home folder as
text) & "pictures")
set rotation_factor to (text returned of (display dialog "Rotate the
picture how many degrees 0 to 360)?" default answer "")) as number
set {scale_factor, scale_type} to {text returned, button returned} of
(display dialog "How much should it be scaled?" & return & <option-L>
"(Percent should be 1 to 100.)" default answer "" buttons {"Percent",
"Pixels", "Cancel"} default button 1)
set scale_factor to (scale_factor as number) / 100
tell application "Image Events"
launch
set the _image to open foo
if scale_type is "percent" then
scale foo by factor scale_factor
else
scale foo to size scale_factor
end if
rotate the _image to angle rotation_factor
save the _image in (path to desktop)
end tell
--
"Beware the march of ideas."
_______________________________________________
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.