Shravani Posted May 10, 2018 Share Posted May 10, 2018 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 More sharing options...
jdelaney Posted May 10, 2018 Share Posted May 10, 2018 ExitLoop badcoder123 1 IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Shravani Posted May 13, 2018 Author Share Posted May 13, 2018 Hi thankyou for your reply i used exit loop but when i use, the code executes only once, i want to execute once all the windows are clicked then i want to exit from the script. 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