Sign in to follow this  
Followers 0
Shocker

SplashTextOn (updating) while ProcessExist

6 posts in this topic

#1 ·  Posted (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 by Shocker

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

@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

 

Share this post


Link to post
Share on other sites
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.

 

Share this post


Link to post
Share on other sites

@AutoBert

Thx 4 reply. It wouldn't work or i'm to stupid to use... :blink:

 

$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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0