While loop trigger question

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
drunkenmonkey
Pro Scripter
Posts: 90
Joined: Fri Jan 31, 2020 10:52 am

While loop trigger question

Post by drunkenmonkey » Tue Nov 23, 2021 1:42 pm

Hi Dorian!

A new tab, the third one, is generated for a x duration, when a download is requested from the previous tab,
and then is closed.
To make sure that the script will continue only when the third tab is close I have this While loop that you showed me and it's working. But I have to add the message command and a press command to be sure that the loop will be triggered.
Am I ok with that way of doing or is there another way to avoid the message and press commands to be showed and still the loop to be triggered.
I did removed it but the loop takes an endless time without the script to continue.
Here's the code:

Code: Select all

let>expHandle_Count=1
while>expHandle_Count>0
GoSub>GetWindowHandles,session_id
JSONParse>theResult,$.value[2],expHandle
Message>expHandle_Count
Press Enter
Wait>.5
Endwhile


Thank you again for your precious help.

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