Mac drop file on standalone, process, and quit

Richard Gaskin ambassador at fourthworld.com
Thu Feb 23 23:40:08 EST 2012


ilsa wrote:
> I've searched the list but haven't found out how to do a very simple
> thing: drop an image file, or a bunch of image files, onto a
> standalone and have it process them all and then quit. So I could have
> the app in the Dock and drop files on it. I have the image processing
> part down, but getting the standalone to recognize the drop, do the
> process on each file and then quit has proved impossible for me. Is
> there a tutorial or example anywhere? Or ideas on a better process?
> This is for LiveCode 5.02 and Mac OS X 10.5.

The trick here is to trap the appleEvent message, taking action on the
'odoc' event.  See the dictionary for the appleEvent message, and also
the request command to obtain the list of files.

-- 
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  LiveCode Journal blog: http://LiveCodejournal.com/blog.irv




More information about the use-livecode mailing list