I want to create a looping structure. Here is some sample code:
label>start
code...
code...
if>a=b,next,finish
label>next
code...
code...
goto>start
label>finish
Would this work? So if a=b, then it will continue on and eventually go back up to the start label. I'm doing this now and it is very inconsistent. It either loops withoutending, but doesn't execute the code inside the labels, or it just stops executing. I can't figure it out.
Any ideas?
Thanks.
Can you use a goto command when the label is above the goto?
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Basic loop looks OK. You can go to a Label that is higher/earlier in the script. (If you have duplicate Labels, program will go to first one it finds reading down from the beginning).
Check that where you are referring to "a" and "b" that you do not have any extra space characters before or after "a" or "b" (Quotes are here for clarification only,not used in actual script. " a" and "a " are not the same as "a". Same thing with "b" and any other variables.
Variables are also Case Sensitive, be sure you are consistent.
May also need "a" and/or "b" to be referenced as %a% or %b%.
Bigger example of actual code would be helpful here to assist you.
Check that where you are referring to "a" and "b" that you do not have any extra space characters before or after "a" or "b" (Quotes are here for clarification only,not used in actual script. " a" and "a " are not the same as "a". Same thing with "b" and any other variables.
Variables are also Case Sensitive, be sure you are consistent.
May also need "a" and/or "b" to be referenced as %a% or %b%.
Bigger example of actual code would be helpful here to assist you.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!