Connecting Tech Pros Worldwide Help | Site Map

Multiple "system" commands? (asynchronously?)

Newbie
 
Join Date: Feb 2009
Posts: 4
#1: Feb 11 '09
Hey!

I simply want to run multiple system $someprogram commands without having to wait for the previous program to shut down before the next one is opened..

e..g
Expand|Select|Wrap|Line Numbers
  1. sub startMyProgs
  2. {
  3.     system $startProgram1;
  4.     system $startProgram2;
  5.     system $startProgram3;
  6. }
  7. # Where $starProgram1 = "SomeApp.exe";
  8. # and $starProgram2 = "SomeOtherApp.exe";
  9.  
The problem now is that after system $startProgram1; it waits until I shut down that program, before it runs system $startProgram2;.
So how can I make it simply run all these three programs without depending on the previous one to be shut down?
KevinADC's Avatar
Expert
 
Join Date: Jan 2007
Location: Southern California USA
Posts: 4,091
#2: Feb 11 '09

re: Multiple "system" commands? (asynchronously?)


You will need to look into Threads. I don't have much experience with using them myself so thats about all the help I can be. Maybe someone else can be more specific.
Newbie
 
Join Date: Feb 2009
Posts: 4
#3: Feb 11 '09

re: Multiple "system" commands? (asynchronously?)


Ye threads did the trick =) Thx
Reply