acien Posted February 18, 2020 Share Posted February 18, 2020 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 WEnd $i = $i + 1 WEnd Link to comment Share on other sites More sharing options...
Developers Jos Posted February 18, 2020 Developers Share Posted February 18, 2020 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? Jos 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 More sharing options...
acien Posted February 18, 2020 Author Share Posted February 18, 2020 the click dragging is to layout the object in a nice grid to make future actions simpler. and i figured out my issue i forgot to reset $j after it finished it's loop so $i was just incrementing after the first pass Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 18, 2020 Moderators Share Posted February 18, 2020 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now