Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 20, 2005, 07:28 PM   #1
Cooknn
macrumors 68020
 
Cooknn's Avatar
 
Join Date: Aug 2003
Location: Fort Myers, FL
Rotating Images with Applescript

I've got an Applescript that rotates my photo's counter clockwise 90°, but there is a slight problem with it. Problem is that if I drag my images to the script I get the error The variable theImage is not defined. I can press Edit or OK. If I press Edit then compile and save I can drag and rotate my pictures fine. But I always have to edit/compile/save first.

Could use some help. Code below.
Code:
on open theFiles
	
	set theFiles to theFiles as list
	
	repeat with aFile in theFiles
		
		set aFile to aFile as alias
		
		tell application "Image Events"
			set theImage to open aFile
			rotate theImage to angle 270
			save theImage in aFile
			close aFile
		end tell
		
	end repeat
	
end open

Last edited by Cooknn; Nov 21, 2005 at 12:31 PM.
Cooknn is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Rotating using didRotateFromInterfaceOrientation and transform UIImage afterwords BarryK88 iPhone/iPad Programming 3 Mar 10, 2011 07:29 AM
How to rotate images in Keynote like this... Chase R Mac Applications and Mac App Store 8 Sep 1, 2009 03:45 PM
Can't rotate images in Photoshop? drgrafix Digital Photography 0 Aug 12, 2008 09:43 AM
iTunes Cover Artwork in Image View with AppleScript???????? allbrokeup Mac Programming 2 Jun 8, 2008 02:11 AM
Rotate Image, set array SirOmega Mac Programming 3 Apr 30, 2008 11:08 AM


All times are GMT -5. The time now is 06:27 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC