I've done a lot of research and tried a few different configurations but can't get this to work correctly.
I'm wanting to cycle through error messages (Using their window titles in a Citrix application.)
The problem is that the errors can be encountered in different order depending on the "Feature" being added through said application.
The best solution would be to CYCLE THROUGH the possible errors on a LOOP multiple times.
I wrote a code to do this however no matter what I've tried the code loops 10 times in a row for each section rather than cycling through the list in order 10 times.
I've tried If exist one after another contained in a big loop, 10 and most recently (Below) even tried a rather large Nested option. (Forgive the numbers I'm still learning nesting elegance.)
Can anyone help me find a way to accomplish my goal?
I can't thank you guys enough... I hate asking, really I do. I'm just really stumped this time!
Code: Select all
Loop, 10
{ ;1
IfWinExist, SOC (#10052) - \\Remote
{ ;2
WinActivate ; Automatically activates the window found above. (If not already active.)
Send, {SPACE}
SLEEP, 100
SEND, ^r
SLEEP, %PressedRefresh%
WinWait, Macro Monster - Excel
IfWinNotActive, Macro Monster - Excel, , WinActivate, Macro Monster - Excel,
Send, {right}DUPLICATE{right}
sleep, 100
Gosub, LOGICMONSTER ;;;Only EXCLUDE while in module mode for individual ttesting.
exitapp ;;;Only include while in module mode.
} ;2
else
{ ;3
IfWinExist, Device SOC Validation Error (#9100047) - \\Remote
{ ;4
WinActivate ; Automatically activates the window found above. (If not already active.)
Send, {SPACE}
SLEEP, 100
SEND, ^r
SLEEP, %PressedRefresh%
WinWait, Macro Monster - Excel
IfWinNotActive, Macro Monster - Excel, , WinActivate, Macro Monster - Excel,
Send, {right}SOC CONFLICT{right}
sleep, 100
Gosub, LOGICMONSTER ;;;Only EXCLUDE while in module mode for individual ttesting.
exitapp ;;;Only include while in module mode.
} ;4
else
{ ;5
IfWinExist, SITT/Device SOC Validation Messages - \\Remote
{ ;6
WinActivate ; Automatically activates the window found above. (If not already active.)
Send, i
sleep, %PostWarnSplash%
send, {Space}
sleep, 200
GOSUB, Add_Soc_Save_Break
} ;6
else
;SLEEP, %PostWarnSplash% ;LOOOOOOOOOOOOOOOOOONG sleep due to ridiculous test account. Testing different position
{ ;7
IfWinExist, Warning - \\Remote
{ ;8
WinActivate ; Automatically uses the window found above.
;WinMaximize ; same (I don't need it maximized but good command to know)
Send, {SPACE}
SLEEP, %PostWarnSplash%
GOSUB, Add_Soc_Save_Break
} ;8
ELSE
{ ;9
IfWinExist, Required Data (#10202) - \\Remote
{ ;10
GOSUB, VM2_Cluster
} ;10
} ;9
} ;7
} ;5
} ;3
Sleep, 200
} ;1