Jump to content

Recommended Posts

Checkbox 1 = checked

and the client is already running with the same tittle as ClientA

but It still starts up the client.

If WinExists($clientA) and GUICtrlRead($Checkbox_1) = $GUI_CHECKED Then
 MsgBox(0, "My Title", "Client is running")
 else
MsgBox(0, "My Title", "Client is not running")
                ShellExecute($client1)
WinWait($clientA)

Endif

so the else still gets excecuted even when the clientA excist and the checkbox1 is checked.

anyone who can help me out with this?

Link to post
Share on other sites

well so I want it to check if it opened all clients that are checked.

this Is the way It opens the clients ( wich works )

If GUICtrlRead($Checkbox_1) = $GUI_CHECKED Then
        GUICtrlSetData($label_7, StringFormat("Starting all selected clients"))
ShellExecute($client1)
WinWait($clientA)
GUICtrlSetData($label_7, StringFormat("Clients Launched"))
EndIf

        If GUICtrlRead($Checkbox_2) = $GUI_CHECKED Then
        GUICtrlSetData($label_7, StringFormat("Starting all selected clients"))
ShellExecute($client2)
WinWait($clientB)
GUICtrlSetData($label_7, StringFormat("Clients Launched"))

EndIf

        If GUICtrlRead($Checkbox_3) = $GUI_CHECKED Then
        GUICtrlSetData($label_7, StringFormat("Starting all selected clients"))
ShellExecute($client3)
WinWait($clientC)
GUICtrlSetData($label_7, StringFormat("Clients Launched"))

EndIf

and now I want to make a check so it made sure it opened all the clients.

wich I tried doing :

If GUICtrlRead($Checkbox_1) = $GUI_CHECKED and WinExists($clientA) Then
 MsgBox(0, "My Title", "Client is running")
 else
MsgBox(0, "My Title", "Client is not running")
ShellExecute($client1)
WinWait($clientA)
Endif

If GUICtrlRead($Checkbox_2) = $GUI_CHECKED and WinExists($clientB) Then
 MsgBox(0, "My Title", "Client is running")
 else
MsgBox(0, "My Title", "Client is not running")
ShellExecute($client2)
WinWait($clientB)
Endif

If GUICtrlRead($Checkbox_3) = $GUI_CHECKED and WinExists($clientC) Then
 MsgBox(0, "My Title", "Client is running")
 else
MsgBox(0, "My Title", "Client is not running")
ShellExecute($client3)
WinWait($clientC)
Endif

But even if the checkbox is unchecked, it still starts the client.

 

clients.png (375×299) (ibb.co)

 

 

I just want to create a program wich opens a few clients and then closes it and re-open ( the selected checkboxes ) them after the timer is down.

 

Edited by xtreempje
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...