Jump to content

Checking if window excist and if checkbox_1 = checked.


Recommended Posts

Mhmm I still need help, If it Excist or doesnt excist it still keep opening inf. clients.

If GUICtrlRead($Checkbox_1) = $GUI_CHECKED and WinExists($clientA) Then
        MsgBox("Title", "The client is already open.", 10)
        Else 
         MsgBox("Title", "Does not excist starting up now.", 10)
        
                ShellExecute($client1)
Sleep(12500)
EndIf

Hope someone can help me out.

Edited by xtreempje
Link to comment
Share on other sites

You probably need to revert to something closer to your original code ---

;; check if all clients are running ;;
If GUICtrlRead($Checkbox_1) = $GUI_CHECKED Then
   If Not WinExists($clientA) Then
        ;; if window isn't found.
        ShellExecute($client1)
   Endif
   Sleep(12500)
Endif

 

Link to comment
Share on other sites

something like this ?

If WinExists($clientA) Then
    MsgBox("Title", "The client is already open.", 10)
Else
    MsgBox("Title", "Does not excist starting up now.", 10)
    ShellExecute($client1)
    WinWait($client1)
EndIf

If GUICtrlRead($Checkbox_1) = $GUI_CHECKED Then

EndIf

 

Edited by ioa747

I know that I know nothing

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...