Re: Template for Debugging "on Open..." Handler
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.