Jump to content

Exit while loop


Recommended Posts

Hi Iam new to programming, could some one help me in exiting the while loop for below script that would be grateful.

 

 

HandleProcessSettingWindows()

Func HandleProcessSettingWindows()
  
    While 1
        ; Retrieve a list of window handles.
        Local $aList = WinList()
        ; Loop through the array displaying only visable windows with a title.
            For $i = 1 To $aList[0][0]
                $hWnd = $aList[$i][1]

            If Not $iLoop Then ExitLoop
                WinGetTitle($hWnd) = "Geometry Processing Options"
                ConsoleWrite("Geometry" & @CRLF)
                ControlFocus("Geometry Processing Options", "&OK", "Button5")
                ControlClick("Geometry Processing Options", "&OK", "Button5")

            ElseIf WinGetTitle($hWnd) = "ROMDAS Laser Profilometer Processing Options" Then
                ConsoleWrite("Laser Profilometer" & @CRLF)
                ControlFocus("ROMDAS Laser Profilometer Processing Options", "&OK", "Button5")
                ControlClick("ROMDAS Laser Profilometer Processing Options", "&OK", "Button5")

            ElseIf WinGetTitle($hWnd) = "GPS Processing Options" Then
                ControlFocus("GPS Processing Options", "Start", "Button1")
                ControlClick("GPS Processing Options", "Start", "Button1")

            ElseIf WinGetTitle($hWnd) = "TPL Processing Options" Then
                ControlFocus("TPL Processing Options", "Start", "Button5")
                ControlClick("TPL Processing Options", "Start", "Button5")

                ;Exit
            EndIf
;Exit
            Next

        WEnd
    Exit
EndFunc   ;==>HandleProcessSettingWindows

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...