I have a script which I am using a For.. Next loop. I want to exit the function when it iterates to a certain number. I tried “Exit Function” and “Exit For”, but it did not work out. I don’t want to exit the test; just the function. Any suggestion?
Exit For should do it. How is it not working out?
Where do you have the Exit For statement?
I am guessing this and I might be wrong...
You have a for loop in an action and you call a function in that loop. You are trying to exit the loop based on condition.
Assign FunctioName=true or false if you want to exit a function. This should work
Please paste your code.
Have you run the script with debug mode on. See if the line "Exit For" or "Exit Function" is called when you run in the debug mode.
I don't build Software but I make them work better, Testing is a Passion
Are you sure it iterates to that number? [img]/images/graemlins/wink.gif[/img]
Exit for should work, otherwise use a workaround:
for i = 1 to 10
print "i: " & i
if i> 6 then i = 11
It finally worked. some silly mistake.