Open application when file double clicked

Peter Haworth pete at
Tue Feb 24 22:15:52 CET 2015

Hi Richard,
It started off life in card 1 of my main script.  Did that because the
dictionary entry for appleEvent says it's sent to "the current card".

If I can't get this to work when the app isn't running, I may just forget
about it.  It's good that it works if the app is already open but my app
already has an Open dialog and a list of Recent files in the File menu so
there's probably not much motivation for a user to flip to the Finder and
double click rather than use the app's built in capabilities to open a file.

I also noticed that I can't drag/drop a file onto the app's window but I
think that's probably something to do with its plist entry.

On Tue Feb 24 2015 at 12:58:34 PM Richard Gaskin <ambassador at>

> Peter Haworth wrote:
> > Thank you Richard and Jacque.  Here's the current status.
> >
> > At Jacque's suggestion I moved the appleevent handler to my main stack
> > script and removed the code that inserted it as a front script.  The
> result
> > of that was the same as with the appleevent handler in a front script,
> > meaning if the app is already open and I double click a file associated
> > with it, the odoc apple event is triggered and all works as expected, but
> > if the app is not already running, no odoc event.  Richard - not sure how
> > that affects your bug report.  Not sure why, but I prefer having the
> > handler in the main stack script than in a front script.
> Where was the script when it wasn't working?
> I had thought it was in your stack script, but apparently I'd misread.
> Was it perhaps not in the message path at all?  It may be that this
> issue was resolved long ago.
> --
>   Richard Gaskin
>   Fourth World Systems
>   Software Design and Development for the Desktop, Mobile, and the Web
>   ____________________________________________________________________
>   Ambassador at      
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:

More information about the use-livecode mailing list