So...I've been at this for a while but am definitely still horrible at it.
To summarize:
I'd like to start the next iteration of the loop after clicking specific options in certain guis.
In my research I've discovered that you can't have any returns in the loop. The problem is I have no idea how to make this work without returns.
Please HELP!
Thanks,
Marc S
(TRIMMED!)
` Startline := 5
Loop, 10
{
CurrentRow := (StartLine - 1) + A_Index ;*****
;----------------***GETTING THE DATA***----------------
ControlFocus,, Proto_Names - Excel
Sleep, 200
oNamesDoc := ComObjActive("Excel.Application")
Global AlertStatus := oNamesDoc.Range("C" CurrentRow).Text
Global AlertQualifier := oNamesDoc.Range("D" CurrentRow).text
Global First := oNamesDoc.Range("H" CurrentRow).text
Global Last := oNamesDoc.Range("I" CurrentRow).text
Global State := oNamesDoc.Range("J" CurrentRow).text
Global Type := oNamesDoc.Range("M" CurrentRow).text
Global HMSStatus := oNamesDoc.Range("P" CurrentRow).text
Global HMSQualifier := oNamesDoc.Range("Q" CurrentRow).text
Global LicenseNo := oNamesDoc.Range("N" CurrentRow).text
Global Scrubbed := oNamesDoc.Range("AB" CurrentRow).value
;----------------***GETTING THE DATA***----------------
;Gui
Gui, 2:Add, Text,x1 y8, Blah Blah
Gui, 2:Add, Button, x1 y40, License
Gui, 2:Add, Button, x80 y40, Name
Gui, 2:Show, , blah blah - Row %CurrentRow% ; Important because it references A_Index
return
2GuiClose:
Gui, 2:Destroy
return
2ButtonLicense:
Gui, 2:Submit
Gui, 2:Destroy
;Another GUI
Gui, 3:Add, Text,x1 y8, Text
Gui, 3:Add, Text,x170 y132, Row %CurrentRow% ;Important because it references A_index
Gui, 3:Add, Button,x1 y125 , blah
Gui, 3:Show, , blah blah
return
3GuiClose:
Gui, 3:Destroy
return
3ButtonAgree:
Gui, 3:Submit
Gui, 3:Destroy
MsgBox, Click OK for Next
continue
}
`
To summarize further:
Goal: Loop the following: 1. Gui #1: option a | option b also would like to display the A_Index
If option A or B is chosen, goto Gui #2
- Gui #2: option c | option d also would like to display the A_Index
If option c, start next iteration of loop from gui 1.
If option d, goto Gui #3
- Gui #3: Checkbox E|F|G|H
If any option is selected, i'd like to update a xslx file (i can figure that part out) and then start the next iteration of the loop.