• 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 droplet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Image Events droplet


  • Subject: Re: Image Events droplet
  • From: kai <email@hidden>
  • Date: Tue, 22 Mar 2005 00:12:27 +0000


On Sun, 20 Mar 2005 14:39:48 -0500, David Marshall wrote:

[snip]

To save the script as a droplet, I changed it to:

- - - - -

on open theseFiles
set inputFile to first item of theseFiles
set outputFile to (choose file name default name "new_name.jpg") as string
tell application "Image Events"
launch
set inputImage to open inputFile
set outputImage to save inputImage as JPEG in file outputFile with icon
close inputImage
end tell
tell application "Finder"
delete inputFile
end tell
quit
end open


- - - - -

which also works.

But I'm running into a wall trying to handle multiple files in a repeat block. I can iterate through theseFiles, opening the choose file name dialog for each, but I can't seem to get a reference I can use in the Image Events block; it seems that inputImage is "not defined" in the line "set outputImage to save inputImage as JPEG in file outputFile with icon."

- - - - -

repeat with thisFile in theseFiles
set inputFile to thisFile
set outputFile to (choose file name default name "new_name.jpg") as string
tell application "Image Events"
launch
set inputImage to open inputFile
set outputImage to save inputImage as JPEG in file outputFile with icon


- - - - -

I'd appreciate any nudge in the right direction. :-)


I can't test this right now, Dave - but I'd try changing the second line of the looping version above to:

set inputFile to thisFile's contents

(I'd also consider placing the 'launch' command before the start of the repeat loop.)

---
kai

_______________________________________________
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


  • Prev by Date: Re: FileMaker 7 Container Fields
  • Next by Date: Re: Image Events droplet
  • Previous by thread: Re: Image Events droplet
  • Next by thread: Re: Image Events droplet
  • Index(es):
    • Date
    • Thread