• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: mutli instances test (was Re: Multi-threaded)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Multi-threaded - thanks (From: "John C. Welch" <email@hidden>)
 >Re: Multi-threaded - thanks (From: Bill Briggs <email@hidden>)
 >Re: Multi-threaded - thanks (From: Shane Stanley <email@hidden>)
 >Re: Multi-threaded - thanks (From: Bill Briggs <email@hidden>)
 >Re: Multi-threaded - thanks (From: Christopher Nebel <email@hidden>)
 >mutli instances test (was Re: Multi-threaded) (From: "leo" <email@hidden>)
 >Re: mutli instances test (was Re: Multi-threaded) (From: Graff <email@hidden>)

  • Prev by Date: applescript-users digest, Vol 3 #2144 - 1 msg ( -Reply)
  • Next by Date: RE: Script tell the wrong app !
  • Previous by thread: Re: mutli instances test (was Re: Multi-threaded)
  • Next by thread: Re: mutli instances test (was Re: Multi-threaded)
  • Index(es):
    • Date
    • Thread