AutoHotkey Community

It is currently May 25th, 2012, 2:34 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Questions about loops
PostPosted: August 12th, 2007, 4:36 pm 
hey is there any way to do For loops of while loops or anything other than just loop # {} ??


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 12th, 2007, 4:58 pm 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 12th, 2007, 5:48 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5346
Location: UK
Could you post the code you have so far?

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 12th, 2007, 6:03 pm 
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
}


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 12th, 2007, 6:40 pm 
Offline

Joined: March 17th, 2007, 7:51 pm
Posts: 45
Location: San Antonio, TX
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 12th, 2007, 6:47 pm 
Offline

Joined: March 17th, 2007, 7:51 pm
Posts: 45
Location: San Antonio, TX
nvm i got it i needed the : infront of the = :)


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: engunneer, Exabot [Bot], Sambo, sarevok9, Wicked and 16 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group