Re: on open applescript handler for drop application
Re: on open applescript handler for drop application
- Subject: Re: on open applescript handler for drop application
- From: red_menace <email@hidden>
- Date: Sat, 26 Sep 2009 14:36:24 -0600
Automator applications already act like droplets (the on open part), so all you need to do is begin your workflow with a Run AppleScript action to see if items have been dropped onto it and throw up the open panel if not:
on run {input, parameters}
if (input is {}) then -- no input items tell (open panel) set title to "My open-panel" set allows multiple selection to true set can choose files to true -- set can choose directories to true -- set treat packages as directories to true display set the output to path names end tell else -- items dropped set the output to the input end if
return output end run
Dave
On Sep 26, 2009, at 1:01 PM, Luc Bressinck wrote: I want to make an automator program that can work: - By dragging one or more files on it: for applescript this is "on open" - By double-clicking and then show the open panel; this is the "on run" handler in applescript
With an applecript action the "on run" works; the "on open" i can't get running. Also i want 1 program to handle both.
Is that possible; How?
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden