Until - Syntax & Usage - AutoHotkey
文章推薦指數: 80 %
The Until statement applies a condition to the continuation of a Loop or For-loop. Until[AHK_L59+] AppliesaconditiontothecontinuationofaLooporFor-loop. Loop{ ... }UntilExpression Parameters Expression Anyvalidexpression. Remarks Theexpressionisevaluatedonceaftereachiteration,andisevaluatedevenifcontinuewasused.Iftheexpressionevaluatestofalse(whichisanemptystringorthenumber0),theloopcontinues;otherwise,theloopisbrokenandexecutioncontinuesatthelinefollowingUntil. LoopUntilisshorthandforthefollowing: Loop{ ... if(Expression) break } However,LoopUntilisofteneasiertounderstandandunliketheabove,canbeusedwithasingle-lineaction.Forexample: Loop x*=2 Untilx>y UntilcanbeusedwithanyLooporFor.Forexample: Loop,Read,%A_ScriptFullPath% lines.=A_LoopReadLine."`n" UntilA_Index=5;Readthefirstfivelines. MsgBox%lines IfA_IndexisusedinExpression,itcontainstheindexoftheiterationwhichhasjustfinished. Related Loop,While-loop,For-loop,Break,Continue,Blocks,Files-and-foldersloop,Registryloop,File-readingloop,Parsingloop,If(expression)
延伸文章資訊
- 1Until | AutoHotkey
Until [AHK_L 59+]. 根据条件判断是否继续执行Loop 或For 循环. Loop { ... } Until Expression. 参数. Expression. 任何有效的...
- 2ahk loop Code Example
Loop, 3 { MsgBox, Iteration number is %A_Index%. ; A_Index will be 1, 2, ... ahk loop · for loop ...
- 3Loop until hotkey released : r/AutoHotkey - Reddit
I want my script to continue looping until I've released the hotkey which triggered it. Any sugge...
- 4AHK turn off loop when Key is pressed - Stack Overflow
I created a code that should send the "E" key until i press the "T" key. Right now the loop only ...
- 5AutoHotKey while loop breaks - Stack Overflow
Every few uses the while loop breaks and keeps spamming forever until i press the bind again. aut...