• 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
Coercing POSIX pathnames into drag info ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Coercing POSIX pathnames into drag info ?


  • Subject: Coercing POSIX pathnames into drag info ?
  • From: Andrew Johnson <email@hidden>
  • Date: Tue, 2 Dec 2003 06:37:11 +1100

Lets try that again...

I'm trying to write an AppleScript Studio app that supports a three different ways of selecting the files/folders it applies its operations to.

The first way is under control using the "on open" handler. The app will process things dropped onto it immediately.

The second way is via a drag and drop well in a window. The actual processing is delayed until the user clicks a button to start the processing.

The third way is via a browse button to bring up an open panel as a sheet. The actual processing is delayed until the user clicks a button to start the processing.

I wrote my code around the first way, and the drag info means there are properties attached to the items that offer some abstraction, and identify them as being folders, identify the file type, if they are an alias or not, and file extension.

I wanted to be able to re-use my "on open" handler, passing it the list of files/folders obtained via the other two methods, BUT it turns out that I get a list of POSIX file names via those methods, not the higher level abstracted object that are obtained via drag info.

Is there an easy way to massage the output from an open panel to have the abstract properties that would occur if they were drag and dropped ?

Or even given the POSIX path to a file system object, is there something I can run to examine it to obtain those properties ?

If there isn't , its not a show stopper, I can write an additional handler that deals with this second style of list of file system objects easily enough.

cheers

aj

--
_______________________________________________________________________________
Andrew Johnson
email@hidden
_______________________________________________
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.

  • Prev by Date: Re: iTunes AppleScript won't use default browser
  • Next by Date: Re: Selected text from Terminal?
  • Previous by thread: Re: Telling remote computer to "do shell script"
  • Next by thread: Mounting remote folder question
  • Index(es):
    • Date
    • Thread