• 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: Sending multiple files to an application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sending multiple files to an application


  • Subject: Re: Sending multiple files to an application
  • From: Walter Ian Kaye <email@hidden>
  • Date: Fri, 26 Sep 2003 11:28:07 -0700

At 10:24a -0600 09/26/2003, email@hidden didst inscribe upon an electronic papyrus:

Hi,

I'm new to Applescript, and I have a question about sending multiple files to
an application. I am working with an application that builds a panorama out of 3 image files. In the Finder, if I select 3 files and drag them onto the app, it will create the panorama. I am trying to script this to work from applescript, but I can't seem to get it to work.

OK...

I've tried creating a list of files with the path names such as: {Macintosh HD:IMAGES:image1.jpg,Macintosh HD:IMAGES:image2.jpg,Macintosh HD:IMAGES:image3.jpg} and sending that to the application, but it doesn't work.

Two problems there: First, literal text must be in quotes. Second, AppleScript doesn't necessarily know that a string of text is a file path -- you should say 'file "path:to:file"' or 'alias "path:to:file"'.

Is there a way to simulate dragging the 3 images onto the app?

set fileList to {alias "Macintosh HD:IMAGES:image1.jpg", alias "Macintosh HD:IMAGES:image2.jpg", alias "Macintosh HD:IMAGES:image3.jpg"}
tell application "Finder"
open fileList using application file id "ABCD"
end tell

where "ABCD" is the creator type of the app in question.

You can find out the creator type this way:

tell app "System Events"
creator type of process 1 whose name contains "PanoramaMaker"
end tell


HTH,
-Walter
PS. Funky settings in your email client. Lines wrapped oddly.
_______________________________________________
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.

References: 
 >Sending multiple files to an application (From: email@hidden)

  • Prev by Date: Re: Sending multiple files to an application
  • Next by Date: Re: Recursion
  • Previous by thread: Re: Sending multiple files to an application
  • Next by thread: Re: Sending multiple files to an application
  • Index(es):
    • Date
    • Thread