Rank: Newbie
Groups: Approved
Joined: 9/13/2021(UTC) Posts: 4 Thanks: 1 times
|
for(i = 0; i < 2; i++) { for(i = 0; i < 2; i++) { sp.MouseClick(new Point(-380,630), MouseButtons.Left, true, true); sp.Sleep(500);
} sp.MouseClick(new Point(-380,830), MouseButtons.Left, true, true); sp.Sleep(500); }
a greenhand question, i want to do a loop in a loop, but the code only runing one loop, outside loop doesn't work, what i did wrong ? thanks
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Use a different variable for the inner loop, using i in both results in the inner loop's i being set to the same as the outer.
Use something like j
for(j = 0; j < 2; j++) {
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The StrokesPlus.net Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close