• 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: Template for Debugging "on Open..." Handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Template for Debugging "on Open..." Handler


  • Subject: Re: Template for Debugging "on Open..." Handler
  • From: Richard Morton <email@hidden>
  • Date: Fri, 19 Mar 2004 12:05:23 +1100

On 19 Mar 2004, at 8:38 AM, Grimm, Kenneth wrote:
Many, many moons ago someone posted sample code for a template to use when
writing an "On Open..." applet ...

...You could
develop your applet/droplet in the editor by just running it. It gave a
similar functionality as Script Debugger's invoking open handler.

Help!

OK! ;-)

The 'open' handler takes a list of aliases, so this does the job:

on run
set fileList to choose file with multiple selections allowed
if class of fileList is not list then set fileList to fileList as list -- in case of single selection
open fileList
end run

Alternatively, if you already have a list of files you're testing with, just do something like this:

on run
set testFiles to {alias "blah", alias "bleh", [...]}
open testFiles
end run

As always, the explicit 'run' declaration is optional.

Cheers,

Choosy Bacca
_______________________________________________
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.


  • Follow-Ups:
    • Re: Template for Debugging "on Open..." Handler
      • From: steve harley <email@hidden>
References: 
 >Template for Debugging "on Open..." Handler (From: "Grimm, Kenneth" <email@hidden>)

  • Prev by Date: Re: Template for Debugging "on Open..." Handler
  • Next by Date: replacing a Scripting Addition in 10.2.8 ?!
  • Previous by thread: Re: Template for Debugging "on Open..." Handler
  • Next by thread: Re: Template for Debugging "on Open..." Handler
  • Index(es):
    • Date
    • Thread