Re: Image events error
Re: Image events error
- Subject: Re: Image events error
- From: Ronan O Ciosoig <email@hidden>
- Date: Mon, 16 Mar 2009 03:29:18 +0100
This worked fine, thanks.
on run argv set imageFile to item 1 of argv
tell application "Image Events" launch set thisImage to open (POSIX file imageFile as text) scale thisImage by factor 0.4 save thisImage with icon close thisImage end tell end run
and I called it using: /usr/bin/osascript /Users/ronanoc/Documents/AppleScripts/scaleImage.scpt DSC00008.JPG
Anyone know what the error " Image Events got an error: Can’t get «class psxf» " means? This is what that part of your script looks like in Script Debuggers with raw syntax showing.
set imageFile to «class psxf» imageFile
So, it may be a coersion error. What class is imageFile? (alias, posix path, text?) Here's a few things you may try:
set thisImage to open (POSIX file imageFile as text)
or set imageFile to (POSIX path of imageFile)
set thisImage to open (POSIX file imageFile as text)
HTH,
ES
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden