• 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
Very Irritating Open Handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Very Irritating Open Handler


  • Subject: Very Irritating Open Handler
  • From: Luther Fuller <email@hidden>
  • Date: Thu, 31 Mar 2011 14:32:39 -0500

I've been using a script for some time and decided to add an open handler to it so that the user could use Drag & Drop in addition to Select & Launch. Imaging my surprise when this script ...

on open dropList
if (count items of dropList) > 1 then error "You may Drag & Drop only one file."
end open

responded by opening a web page in Safari. I had Dragged & Dropped a .webloc file onto it.
I want the script to ignore . webloc files ... and many other files that don't make sense to the script.

Next I tried this script ...

on open dropList
try
repeat with dropItem in dropList
set dropAlias to (dropItem as alias)
tell application "Finder" to name of dropAlias
display dialog the result
end repeat
on error errText number errNr
"Error = " & errNr & return & errText
display dialog the result
end try
end open

hoping to see an error message. But there is no error message! If dropList contains a .webloc file, the script simply quits without error when it is encountered in the list and Safari opens its web page.

The problem occurs even with this very simple script ...

on open dropList
end open

So it seems to be impossible to work-around it.
This seems to be very undesirable buggy behavior. The open handler should not do this!

 _______________________________________________
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

  • Prev by Date: Re: Mail App - plain text
  • Next by Date: Re: Mail App - plain text
  • Previous by thread: Re: Error Msg 10004 and 1708
  • Next by thread: Very Irritating Open Handler
  • Index(es):
    • Date
    • Thread