[Idea:] Wish to introduce Until{ }
Posted: 23 Jan 2024, 06:54
Wish to introduce Until{}. It generally has the below usages:
[Code1:]
Or [Code2:]
The Until block will be executed as long as the loop is not terminated by break , GoTo or continue 2.
[Code1:]
Code: Select all
arr:=['John','Smith','Micheara']
loop{
if arr[A_Index]=='David'{
MsgBox('I found David!')
break
}
}Until A_index>=3{
MsgBox('I can not find David!')
}
Code: Select all
arr:=['John','Smith','Micheara']
for x in arr{
if x=='David'{
MsgBox('I found David!')
break
}
}Until{
MsgBox('I can not find David!')
}