Simple Until Loop - AutoHotkey Community
文章推薦指數: 80 %
Loop Until not triggering - AutoHotkey Community
AutoHotkeyCommunity
Let'shelpeachotherout
Skiptocontent
Home
Quicklinks
Unansweredtopics
Activetopics
Search
WebSearch
Forums
Members
Theteam
IRC
Commands
Tutorial
Download - 1.1.34.04
FAQ
Login
Register
Search
Login
Register
WebSearch
Search
Advancedsearch
Home Boardindex
AutoHotkey
AskForHelp
Search
Itiscurrently25Aug2022,14:38
AlltimesareUTC-05:00
SimpleUntilLoop
Topicissolved
GethelpwithusingAutoHotkeyanditscommandsandhotkeys
Forumrules
PostReply
Emailtopic Printview
Search
Advancedsearch
36posts
1
2
Next
Barney15
Posts:162
Joined:12Jan2020,14:18
SimpleUntilLoop
Reportthispost
@
Quote
05May2020,08:28
>method1
*Until
Code:Selectallx=0
Loop {
x++
if(x=10) {
x-=10
y+=1
}
ToolTip,%"Counting".x."`nRepeat".y
} Untily=100
>method2
*While
Code:Selectallx=0
y=1
Whiley<100 {
x++
if(x>10) {
x-=10
y+=1
}
ToolTip,%"Counting".x."`nRepeat".y
Sleep,400
}
ifyoucanthinkofothermethodsplease,becausei'msearchingformoreprofessionalwrittentothiscode.
isusingforpossible.
Top
Smile_
Posts:690
Joined:03May2020,00:51
Re:SimpleUntilLoop
Reportthispost
@
Quote
05May2020,09:53
Wahtaboutthis:
Code:Selectallx=0
y=1
Count:
ToolTip,%"Counting".x."`nRepeat".y
x+=1
ifx=10
{
y+=1
x=0
}
ify<>100
Goto,Count
else
Return
Top
boiler
Posts:12258
Joined:21Dec2014,02:44
Re:SimpleUntilLoop
Reportthispost
@
Quote
05May2020,10:01
Barney15wrote:↑05May2020,08:28
isusingforpossible.
Forisonlyusedwithobjects,andtheredoesn’tlooktobeagoodreasontocreateanobjectforthispurpose.Youalreadyhavechosenthetwobestchoicesinwhileanduntil.Irecommendavoidinggotoasitpromotesbadprogrammingpractices.
Top
Barney15
Posts:162
Joined:12Jan2020,14:18
Re:SimpleUntilLoop
Reportthispost
@
Quote
05May2020,10:43
Iunderstand,butcantheloopbecreatedinawaysimilarto
#include
延伸文章資訊
- 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...
- 4Loop - Syntax & Usage - AutoHotkey
The Loop statement performs a series of code lines repeatedly: either the specified number of tim...
- 5AutoHotKey while loop breaks - Stack Overflow
Every few uses the while loop breaks and keeps spamming forever until i press the bind again. aut...