MWichter Posted June 17, 2015 Share Posted June 17, 2015 (edited) This gets compile errors at the marked Next statement. I just cannot see what I am doing wrong?expandcollapse popup#RequireAdmin #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_Run_Au3Stripper=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ; Include libraries and System settings #include <IE.au3> #include <MsgBoxConstants.au3> #include <ScreenCapture.au3> #include <File.au3> #include <FileConstants.au3> #include <Excel.au3> AutoItSetOption('MouseCoordMode', 0) ; set mouse to use current window for coodinates rather than the whole screen ; ______________________________________________________________________________________________________________________ ; Global Variable definitions Global $oIE5 Global $s_Test_Request ; Test Request Global $s_Test_Sequence ; Test Sequence Global $s_Test_Sequence_Folder ; Test Sequence Folder name Global $s_Test_Sequence_File_Name ; Test Sequence file being processed Global $s_AQA_Path ; Full Path to the AQA Testing Folder Global $s_TC_Id ; Test Case ID (From TestRail) Global $s_TC_Component ; ARMS Component Global $s_TC_Function ; ARMS Function Global $s_TC_Feature ; ARMS Feature Global $s_TC_TestCase ; Arms Test Case ; ______________________________________________________________________________________________________________________ ; ***** Processing starts here ***** ; Get Test Requent and Test Sequence Number from user ; ++++++++++ Call Startup Function here ; Hard code startup parametere for testing and development $s_Test_Request = "9999" $s_Test_Sequence = "001" $s_AQA_Path = "K:\ATT\TechnicalServicesGroup\SpecialAccess\TestEngineering\ARMS_QA\Tests_In_Progress" $s_Test_Sequence_Folder = $s_AQA_Path & "\QA_Testing_9999_For_Development_&_Testing_Only\Sequence_9999_001" ; Get list of files in the Test Sequence folder Local $hTS_Files = FileFindFirstFile($s_Test_Sequence_Folder & "\ARMS_AQA_TS*.xls") ; Check for no-files found If $hTS_Files = -1 Then MsgBox($MB_SYSTEMMODAL, "ARMS AQA System", "Error: No Test Sequence files found in Test Sequence Folder:" & @CRLF & $s_Test_Sequence_Folder) Exit EndIf ;Process Each Test Sequence file ; Get file names and process each one at a time Local $iResult = 0 While 1 $s_Test_Sequence_File_Name = FileFindNextFile($hTS_Files) If @error then ExitLoop ;*** Process each file*** MsgBox(0, "AQA Testing", $s_Test_Sequence_File_Name) Call ("Process_TS_File") WEnd Exit ; For testing ; ______________________________________________________________________________________________________________________ Func Process_TS_File() ; Process Next Test Sequence File Local $oAppl = _Excel_Open() ; Open Test Sequence File Local $oTS_WB_Handle = _Excel_BookOpen($oAppl, $s_Test_Sequence_Folder & "\" & $s_Test_Sequence_File_Name) If @error Then MsgBox($MB_SYSTEMMODAL, "ARMS AQA System", "Error: Test Sequence Excel WorkBook" & @CRLF & "Got Open Error: " & @error & @CRLF & "File Name: " & $s_Test_Sequence_File_Name) Exit EndIf ; Get Cell Contents for each row For $i = 2 to 1000 ; Is Test Active? Local $sActive = _Excel_RangeRead($oTS_WB_Handle, Default,"B" & $i) If @error Then MsgBox($MB_SYSTEMMODAL, "ARMS AQA System", "Error: Cell B" & $i & " could not be read"& @CRLF & "Got Read Error: " & @error) Exit EndIf MsgBox (0, "ARMS ADA Testing", "Cell B" & $i & ": " & $sActive) If $sActive = "y" or $sActive = "Y" Then Next ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< EndIf ; Get Test Case ID $s_TC_I = _Excel_RangeRead($oTS_WB_Handle, Default,"A" & $i) If @error Then MsgBox($MB_SYSTEMMODAL, "ARMS AQA System", "Error: Cell A" & $i & " could not be read"& @CRLF & "Got Read Error: " & @error) Exit EndIf MsgBox (0, "ARMS ADA Testing", "Cell A" & $i & ": " & $s_TC_I) Next ; Close Test Sequence File _Excel_BookClose($oTS_WB_Handle) EndFunc Edited June 17, 2015 by Melba23 Added code tags Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 17, 2015 Moderators Share Posted June 17, 2015 (edited) MWichter,Welcome to the AutoIt forum.But please pay attention to where you post - the "Dev Chat" section where you started this thread is not for general support questions. I have moved it for you, but would ask you to be more careful in future.As to the problem, try using ContinueLoop at that point.M23P.S. When you post code please use Code tags - see here how to do it. Then you get a scrolling box and syntax colouring as you can see above now I have added the tags. Edited June 17, 2015 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
MWichter Posted June 17, 2015 Author Share Posted June 17, 2015 Sorry about not doing this correctly.Obviously I am brand new to forums.Your suggestion works great.I wish the "For" description included this.Thanks for your help!!!! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 17, 2015 Moderators Share Posted June 17, 2015 MWichter,Glad I could help.I wish the "For" description included thisContinueLoop is mentioned as "Related" on the For..To..Next..Step page in the Help file - personally I think that is adequate.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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