Loop until strText is empty?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
billc520
Newbie
Posts: 1
Joined: Fri Jun 02, 2023 1:50 am

Loop until strText is empty?

Post by billc520 » Fri Jun 02, 2023 1:51 am

Is there a loop that will continue until strText is empty?

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1348
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Loop until strText is empty?

Post by Dorian (MJT support) » Fri Jun 02, 2023 8:42 am

This would keep looping indefinitely while strText contained a value. You'd put whatever strText code you're using inside the loop. For this example I used OCRArea.

Code: Select all

Let>strText=hello

while>strText<>
  //Example code
  OCRArea>1220,655,1789,839,strText
endwhile
Another way could be to loop while the length of strText >0

Code: Select all

Let>strText=hello
len>strText,lenstrText

while>lenstrText>0
  //Example code
  OCRArea>1220,655,1789,839,strText
  len>strText,lenstrText
endwhile
Yes, we have a Custom Scripting Service. Message me or go here

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts