• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Image Events problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Image Events problem


  • Subject: Re: Image Events problem
  • From: Philip Aker <email@hidden>
  • Date: Fri, 15 Sep 2006 08:09:37 +0100

On 2006-09-15, at 05:52:39, Simon Whitaker wrote:

try
	set _jpeg_file to (path to desktop as string) & "test.jpg"
	set _pict_file to (path to desktop as string) & "test.pict"

	tell application "Image Events"
		launch
		set image_data to open file _jpeg_file
		tell application "Finder" to set new_item to _pict_file
		save image_data in new_item as PICT
		close image_data
	end tell
on error e
	return {e, number of e}
end try

Hi Simon,

You're not setting the input file to type alias.

The line calling the Finder is unwarranted, hence the parameters to the save command many not be what is expected.

The error return seems wrong. Looks like you're trying to coerce the error string to a number -- unlikely to work with the type of error string normally returned.


Look for IE scripting examples on google.

Philip Aker
email@hidden


_______________________________________________ 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
References: 
 >Image Events problem (From: Simon Whitaker <email@hidden>)

  • Prev by Date: Rép: How may I get/trigger some menu items in Pages
  • Next by Date: Re: Mail signature script broken after X.3.4
  • Previous by thread: Image Events problem
  • Next by thread: RE: Image Events problem
  • Index(es):
    • Date
    • Thread