|
#1
|
|||
|
|||
|
Running applications in sequence
Hi All,
I was wondering if you can run applications such as follow: 1- run one application such as ccleaner or something. 2- wait for the first application to finish the work, once its finished start another application in sequence and so forth. is there a way to accomplish this? cheers, |
|
#2
|
||||
|
||||
|
Use true in wait for return with File.Run
Code:
File.Run("MyProgram", "myargs", "", SW_SHOWNORMAL, true);
__________________
User error: replace user and press any key to continue. |
|
#3
|
|||
|
|||
|
oh thanks i will try it. is there a way in the script to run a program ans once its finished close it and start another program in the sequence?
cheers, |
|
#4
|
||||
|
||||
|
You can use this function after each process complete.
Code:
function EndProgram(Prog)
processes = System.EnumerateProcesses();
for j, file_path in processes do
file = String.SplitPath(file_path);
if (String.Lower(file.Filename..file.Extension)) == Prog then
System.TerminateProcess(j);
end
end
end
Code:
--program name should be lowercase
EndProgram("yourprogram.exe");
__________________
User error: replace user and press any key to continue. |
|
#5
|
|||
|
|||
|
All you need to do is
Code:
File.Run("MyProgram1", "myargs", "", SW_SHOWNORMAL, true);
File.Run("MyProgram2", "myargs", "", SW_SHOWNORMAL, true);
File.Run("MyProgram3", "myargs", "", SW_SHOWNORMAL, true);
..and so on
__________________
Dermot AMS Add-ons - xDialog.com A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine. |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT -6. The time now is 08:30 AM.








Linear Mode
