Re: multiple overlapping executions of a script
Re: multiple overlapping executions of a script
- Subject: Re: multiple overlapping executions of a script
- From: Jon Pugh <email@hidden>
- Date: Wed, 5 Nov 2003 08:09:46 -0800
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.