xtreempje Posted January 16, 2023 Share Posted January 16, 2023 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 comment Share on other sites More sharing options...
ioa747 Posted January 16, 2023 Share Posted January 16, 2023 we could continue on the same thread you don't need a new one I know that I know nothing Link to comment Share on other sites More sharing options...
xtreempje Posted January 16, 2023 Author Share Posted January 16, 2023 Ah my bad sorry. Link to comment Share on other sites More sharing options...
ioa747 Posted January 16, 2023 Share Posted January 16, 2023 (edited) since you changed it again, what exactly do you want? go through the rest of the script Edited January 16, 2023 by ioa747 I know that I know nothing Link to comment Share on other sites More sharing options...
xtreempje Posted January 16, 2023 Author Share Posted January 16, 2023 (edited) 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 January 16, 2023 by xtreempje Link to comment Share on other sites More sharing options...
ioa747 Posted January 16, 2023 Share Posted January 16, 2023 If GUICtrlRead($Checkbox_1) = $GUI_CHECKED And Not WinExists($clientA) Then MsgBox(0, "My Title", "Client is not running") ShellExecute($client1) Else MsgBox(0, "My Title", "Client is running or $Checkbox_1 is unCheck") EndIf xtreempje 1 I know that I know nothing Link to comment Share on other sites More sharing options...
xtreempje Posted January 16, 2023 Author Share Posted January 16, 2023 Thank you so much man!! Link to comment Share on other sites More sharing options...
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