Drag & Drop to Launch an App

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
MikeC
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9
Joined: Tue Sep 18, 2012 2:12 pm

Drag & Drop to Launch an App

Post by MikeC » Wed Sep 26, 2012 7:16 pm

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.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Drag & Drop to Launch an App

Post by FourthWorld » Wed Sep 26, 2012 7:39 pm

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 $#.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Klaus
Posts: 14198
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Drag & Drop to Launch an App

Post by Klaus » Wed Sep 26, 2012 7:41 pm

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

MikeC
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9
Joined: Tue Sep 18, 2012 2:12 pm

Re: Drag & Drop to Launch an App

Post by MikeC » Sat Sep 29, 2012 9:12 am

Thanks folks, found useful stuff in the lessons.
It's just a case of knowing where to look first.

Post Reply