Re: multiple overlapping executions of a script
Re: multiple overlapping executions of a script
- Subject: Re: multiple overlapping executions of a script
- From: "leo" <email@hidden>
- Date: Thu, 6 Nov 2003 14:03:17 +1100
hi there
thanks for the detailed info! i guess in my case (itunes script which should
react agin before termination) i had to use some kind of "wrapper script"
which is bound to the activation key.
this wrapper script would just call "do shell realscript &" and terminate.
so after that the realscript can run for a while and a new key press before
termination of this first instance would still activate the wrapper (and
with it a second instance of the realscript).
does that sound feasible?
cheers, leo
----- Original Message -----
From: "Jon Pugh" <email@hidden>
To: <email@hidden>
Sent: Thursday, November 06, 2003 3:09 AM
Subject: Re: multiple overlapping executions of a script
>
At 10:37 PM -0800 11/4/03, Walter Ian Kaye wrote:
>
>>i have a little script which runs for a little while. i want to invoke
it
>
>>again _during_ its first execution in a way that i have two instances or
so.
>
>>
>
>>i can't make it work: in the script editor it obviously doesn't work,
but
>
>>even if i save it as compile script ("application") a second
double-click on
>
>>the file when the first instance still runs just activates the first
>
>>instance nothing else. :-(
>
>
Actually, Mac OS X allows this sort of thing, just not the Finder. If you
launch a program from the terminal (or BBEdit) just add an & to the end of
the line to start a new instance.
>
>
/Folder/ScriptName&
>
>
This will cause a new one to launch in the background.
>
>
>
>Mac OS does not support that sort of thing. You only get one instance.
>
>If you want two, duplicate the file and run the duplicate separately.
>
>
>
>>and the next issue would be how this two instances can communicate with
each
>
>>other. (what do the properties do in this situation?)
>
>
>
>That "properties" problem is likely why we don't complicate the Mac with
multiple "instances" of apps. ;-)
>
>
Properties belong to a running script. Each one has its own properties.
They are written to the script when it quits, if and only if the script
runner does so. Scripts themselves can also store scripts using the "store
script" command. In all cases, the last one to write to the file is the one
that persists.
>
>
Jon
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.