• 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: What makes AppleScript difficult
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What makes AppleScript difficult


  • Subject: Re: What makes AppleScript difficult
  • From: Luther Fuller <email@hidden>
  • Date: Mon, 10 Dec 2007 16:22:32 -0600

Just ran into a situation that reminded me of a complaint I made years (decades ?) ago. A couple of weeks ago, I put together a quickie script in an afternoon. Used Drag & Drop. At some point I added a Select & Launch interface. Today I was getting all the details working exactly and precisely right. Then I noticed that I really didn't want to have alias files in the selection, because that could lead to bizarre or even dangerous behavior.

So I modified the code to filter out alias files. Then ...

I remembered that the list passed to the 'open' handler is a list of aliases in which alias files are always resolved. Bad news. So I changed the 'open' handler to 'main'. No more Drag & Drop. THIS IS A BUG. Alias files passed to an 'open' handler should never be resolved. Sometimes I may filter out alias files, sometimes not and sometimes they should be resolved. The choice should be mine. I would have liked to include a Drag & Drop interface, but in this case, it is just too dangerous.

I would like to see this fixed!

And I also noticed ...

The Finder's 'selection' is a list of file references;
and
The open handler's dropped items list is a list of aliases.

Both of these lists always end up in the same place, so I always have to convert the 'selection' list to a list of aliases. Why the difference?

It seems that an easy fix would be something like ...

	tell application "Finder"
		set x to selection as alias list

which I tried a few minutes ago. It doesn't work.

_______________________________________________
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
  • Follow-Ups:
    • Re: What makes AppleScript difficult
      • From: Philip Aker <email@hidden>
    • Re: What makes AppleScript difficult
      • From: Michelle Steiner <email@hidden>
    • Re: What makes AppleScript difficult
      • From: Doug McNutt <email@hidden>
References: 
 >Re: What makes AppleScript difficult (From: Brennan <email@hidden>)
 >Re: What makes AppleScript difficult (From: Michelle Steiner <email@hidden>)
 >Re: What makes AppleScript difficult (From: Mark Myers <email@hidden>)

  • Prev by Date: Re: difference between property and variable
  • Next by Date: Re: Welcome back, Dave!
  • Previous by thread: Re: What makes AppleScript difficult
  • Next by thread: Re: What makes AppleScript difficult
  • Index(es):
    • Date
    • Thread