OSX Opening an App with a document

J. Landman Gay jacque at hyperactivesw.com
Thu Oct 6 13:44:29 EDT 2016


You can create your own system globals by prepending "$" to the variable 
name. If you do that in the appleEvent handler then later whenever you need 
it, you can access the global. Unless things have changed since I last used 
it, appleEvent is sent immediately during startup .

Or you could use a script local the same way.

Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



On October 6, 2016 6:41:26 AM Paul Dupuis <paul at researchware.com> wrote:

> Does anyone have any good code for this?
>
> On 10/5/2016 5:56 PM, Paul Dupuis wrote:
>> Okay list gurus:
>>
>> What is the best practice method for determine whether a Standalone app
>> under OSX was opened with a document (by drag and drop or double-click)?
>>
>> I have an appleevent handler that get any doc dropped on the app while
>> it is running. I was also checking this after startup (and by startup I
>> mean the initial message set of startup, preopenstack, openstack, etc,
>> etc. opencard). I needed to change the startup sequence a bit and now
>> the code I was using is essentially on opencard. Hwoever, checking the
>> pendingMessages shows the standalone has not yet received the appleevent
>> message yet.
>>
>> This is SOO much simpler under Windows where the global $1 has any file
>> that was launched at startup - AT startup!
>>
>> Does anyone have any good on-startup code to determine if an OSX app was
>> launched with a doc?
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your 
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode






More information about the use-livecode mailing list