<div dir="ltr">Hello,<div><br></div><div>I have a very simple while loop and I want to wait for a mouse click(can be a different input, not important) between every step. What I want to achieve is something like this:</div><div><br></div><div><pre class="" style="margin-top:0px;padding:5px;border:0px;font-size:13px;overflow:auto;width:auto;max-height:600px;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:inherit"><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,139)">while</span><span class="" style="margin:0px;padding:0px;border:0px;color:black"> </span><span class="" style="margin:0px;padding:0px;border:0px;color:black">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:black">i </span><span class="" style="margin:0px;padding:0px;border:0px;color:black"><</span><span class="" style="margin:0px;padding:0px;border:0px;color:black"> </span><span class="" style="margin:0px;padding:0px;border:0px;color:maroon">50</span><span class="" style="margin:0px;padding:0px;border:0px;color:black">){</span><span class="" style="margin:0px;padding:0px;border:0px;color:black">
</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,139)">print</span><span class="" style="margin:0px;padding:0px;border:0px;color:black">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:black">i</span><span class="" style="margin:0px;padding:0px;border:0px;color:black">)</span><span class="" style="margin:0px;padding:0px;border:0px;color:black">
i </span><span class="" style="margin:0px;padding:0px;border:0px;color:black">+=</span><span class="" style="margin:0px;padding:0px;border:0px;color:black"> </span><span class="" style="margin:0px;padding:0px;border:0px;color:maroon">1</span><span class="" style="margin:0px;padding:0px;border:0px;color:black">
waitForMouseClick</span><span class="" style="margin:0px;padding:0px;border:0px;color:black">() //Wait here for user input.</span><span class="" style="margin:0px;padding:0px;border:0px;color:black">
</span><span class="" style="margin:0px;padding:0px;border:0px;color:black">}</span></code></pre></div><div>I also use Sprite Kit if you can think a solution related to it.<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;white-space:normal;background-color:rgb(255,255,255)"><br></span></div><div><br></div><div>Cheers,</div><div><br></div><div>Ergin</div><div><br></div></div>