Shocker Posted May 22, 2016 Posted May 22, 2016 (edited) Hi @ all is it possible to updating a SplashTextOn (like example), but as long as a process exists? $message = "Installing " Local $x[3] $x[0] = "Installing. " $x[1] = "Installing.. " $x[2] = "Installing..." SplashTextOn("Information", $message, -1, -1, -1, -1, 4, "") For $i = 0 To UBound($x) + 1 $message = $x[$i] ControlSetText("Information", "", "Static1", $message) Sleep(1000) Next Edited May 22, 2016 by Shocker
AutoBert Posted May 22, 2016 Posted May 22, 2016 Yes: Local $x[3] $x[0] = "Installing. " $x[1] = "Installing.. " $x[2] = "Installing..." SplashTextOn("Information", $message, -1, -1, -1, -1, 4, "") For $i = 0 To UBound($x) + 1 $message = $x[$i][0] While ProcessExists("InstallingProcess") ControlSetText("Information", "", "Static1", $message) Sleep(100) WEnd Next it would be a good idea to put the PIDs also in array. So make a 2D array instead of 1D.
Shocker Posted May 22, 2016 Author Posted May 22, 2016 @AutoBert Thx for reply! Get an error when testing... ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $message = $x[$i][0] $message = ^ ERROR #include <Array.au3> $message = "Installing " Local $x[3] $x[0] = "Installing. " $x[1] = "Installing.. " $x[2] = "Installing..." SplashTextOn("Information", $message, -1, -1, -1, -1, 4, "") For $i = 0 To UBound($x) + 1 $message = $x[$i][0] While ProcessExists("notepad.exe") ControlSetText("Information", "", "Static1", $message) Sleep(100) WEnd Next
AutoBert Posted May 22, 2016 Posted May 22, 2016 20 minutes ago, Shocker said: Get an error when testing... use $message = $x[$i] for the test script, but keep in mind: 2 hours ago, AutoBert said: t would be a good idea to put the PIDs also in array. So make a 2D array instead of 1D.
Shocker Posted May 22, 2016 Author Posted May 22, 2016 @AutoBert Thx 4 reply. It wouldn't work or i'm to stupid to use... $message = " " Local $x[6] $x[0] = " " $x[1] = ". " $x[2] = ".. " $x[3] = "... " $x[4] = ".... " $x[5] = "....." SplashTextOn("Information", $message, -1, -1, -1, -1, 4, "") While ProcessExists("notepad.exe") For $i = 0 To UBound($x) - 1 $message = $x[$i];[0] ControlSetText("Information", "", "Static1", "Installing" & $message) Sleep(500) If Not ProcessExists("notepad.exe") Then ExitLoop Next WEnd This^^ work, also ok? What do you mean with PID and 2D Array?
AutoBert Posted May 22, 2016 Posted May 22, 2016 I thought you want run installation process and update the splashtext with information which installation is running, so i suggest to store the ProcessID (run returns it, can be used for ProcessExists instead of the name) the array. The array you have declared is a 1 dimension array whith X Rows. In a 2 dimension array there are X Rows and Y Cols. Local $x[6][2] will declare a array with 6 rows and 2 cols. But a 2D array is only needed when you want to watch more than one process at same time.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now