| View previous topic :: View next topic |
| Author |
Message |
CerealBH Guest
|
Posted: Sun Aug 12, 2007 3:36 pm Post subject: Questions about loops |
|
|
| hey is there any way to do For loops of while loops or anything other than just loop # {} ?? |
|
| Back to top |
|
 |
Cerealbh Guest
|
Posted: Sun Aug 12, 2007 3:58 pm Post subject: |
|
|
update: im trying to make a program thats going to click points on a grid need to do actions to each one of those x's and want to setup some loops to go through the gride so i dont' have to have so much messy code
X X X X X
X X X X X
X X X X X
X X X X X
X X X X X |
|
| Back to top |
|
 |
polyethene
Joined: 11 Aug 2004 Posts: 5248 Location: UK
|
Posted: Sun Aug 12, 2007 4:48 pm Post subject: |
|
|
Could you post the code you have so far? _________________ GitHub • Scripts • IronAHK • Contact by email not private message. |
|
| Back to top |
|
 |
CerealBH Guest
|
Posted: Sun Aug 12, 2007 5:03 pm Post subject: |
|
|
well, right now all i have for code, is where is clicks the first Row, i need the commands to allow me to do loops
ill write in C++ what i need and AHK what i already have
| Code: |
row = 0
while (row != 5)
{
Click %xaxis%,%yaxis%
xaxis = xaxis + 100
row = row + 1
} |
|
|
| Back to top |
|
 |
Cereal
Joined: 17 Mar 2007 Posts: 45 Location: San Antonio, TX
|
Posted: Sun Aug 12, 2007 5:40 pm Post subject: |
|
|
here wrote some code in ahk, but its not executing correctly, it goes through the loop once, then stops...
| Code: |
#s::
IfWinExist ahk_class MozillaUIWindowClass
{
WinActivate
}
else
{
WinWait ahk_class MozillaUIWindowClass
WinActivate
}
xaxis = 400
yaxis = 380
horizspace = 150
; TOP ROW
Loop 5
{
IfWinExist ahk_class MozillaUIWindowClass
{
WinActivate
}
else
{
WinWait ahk_class MozillaUIWindowClass
WinActivate
}
Click %yaxis%,%xaxis%
xaxis = xaxis + horizspace
sleep 2500
;Close
Click 493, 132
sleep 1000
}
MsgBox Done
return |
|
|
| Back to top |
|
 |
Cereal
Joined: 17 Mar 2007 Posts: 45 Location: San Antonio, TX
|
Posted: Sun Aug 12, 2007 5:47 pm Post subject: |
|
|
nvm i got it i needed the : infront of the =  |
|
| Back to top |
|
 |
|