Jump to content

nested while loops dont run


Recommended Posts

I have a extremely simple script i cant figure out why it wont run.

It's 2 nested while loops that iterate a click drag action but only in inner loop is running.

I've tried almost everything i can think of to get it to work changing loop types running x64 and x86 breaking the loops out into their own functions. Both loops run fine independently but the second i try and nest them the outer one acts like the inner ones wend is for it.

 the code is:

Global $i = 1
Global $j = 1
While($i < 12)
   While($j < 8)
      MouseClickDrag("left", 1625, 120, $i * 130, $j * 130, 0)
      $j = $j + 1
   $i = $i + 1


Link to comment
Share on other sites

  • Developers

You should use only one loop with if's as having 2 loops like that doesn't make any sense!
...  having said that: Why would you need any of this insane amount of Clicking&Dragging anyways?


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
Live for the present,
Dream of the future,
Learn from the past.

Link to comment
Share on other sites

  • Moderators
49 minutes ago, acien said:

I have a extremely simple script i cant figure out why it wont run.


23 minutes ago, acien said:

the click dragging is to layout the object in a nice grid to make future actions simpler.

I think what Jos is eluding to is there has to be an easier way to get the object layout you desire. This way of doing it will always be temperamental and prone to error.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...