Page 1 of 1
Drag & Drop to Launch an App
Posted: Wed Sep 26, 2012 7:16 pm
by MikeC
Looking in the user manual there is info on using D&D within an app.
But is it possible to drop a preferences file on a standalone app to cause it to launch and load those preferences on start up?
Or am I missing something?
Thanks.
Re: Drag & Drop to Launch an App
Posted: Wed Sep 26, 2012 7:39 pm
by FourthWorld
On OS X the paths of files dropped onto an app are available from the request command within an appleEvent handler, checking for the oapp event - see the dictionary entry for "appleEvent" for details.
On Windows and Linux the paths of files dropped on the app are available in the global vars $1, $2, etc. You can obtain the number of such globals by checking the value of $#.
Re: Drag & Drop to Launch an App
Posted: Wed Sep 26, 2012 7:41 pm
by Klaus
Hi Mike,
welcome to the forum!
Sorry, I did not try this before myself, but check the entry for $ (dollar sign) in the dictionary.
Best
Klaus
Re: Drag & Drop to Launch an App
Posted: Sat Sep 29, 2012 9:12 am
by MikeC
Thanks folks, found useful stuff in the lessons.
It's just a case of knowing where to look first.