Re: mutli instances test (was Re: Multi-threaded)
Re: mutli instances test (was Re: Multi-threaded)
- Subject: Re: mutli instances test (was Re: Multi-threaded)
- From: "leo" <email@hidden>
- Date: Mon, 10 Nov 2003 17:59:39 +1100
yep, sounds exactly what i've experienced...
"Graff" <email@hidden> wrote:
>
[...]
>
This spawns one instance in AppleScript then waits for it to quit and
>
spawns another:
>
do shell script "nohup ~/Desktop/ClearComment.app &
>
do shell script "nohup ~/Desktop/ClearComment.app &
>
>
This spawns two instances side by side in AppleScript: (all on one line)
>
do shell script "/bin/tcsh -c 'nohup ~/Desktop/ClearComment.app
>
&;nohup ~/Desktop/ClearComment.app &'"
>
>
It looks like the AppleScript environment can only have 1 shell going
>
at a time. If you stuff multiple commands into that shell they run
>
just fine, but if you try to get them to run commands sequentially they
>
fail.
your explanation sounds sensible: applescript might only allow one shell at
a time.
_but_: with this nohup command to my knowledge the shell should just
terminate and leave the applscript process just runnning. _that_ is what i
don't understand
>
I even tried a workaround by having a shell script wrapper called
>
ScriptWrapper. I saved the following as a text file on the Desktop and
>
did "chmod -X" on it:
>
#! /bin/csh
>
~/Desktop/ClearComment.app &
>
>
I called it like:
>
do shell script "~/Desktop/ScriptWrapper"
>
do shell script "~/Desktop/ScriptWrapper"
>
>
Still no good.
i guess the only workaround seems to be doing the wrapping _outside_
applescript, i.e. do the "do shell script" in another language.
i might try python tonight. but better for this little task might be slim
launcher in C?
cheers, leo
_______________________________________________
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.