Jump to content

Stupid Noob Question


 Share

Recommended Posts

I've entered the wonderful world of scripting now! Woohoo!

I cant understand that you can do SOO much with scripting, its amazing, im excited.

Well i wrote this program, and i was wondering if there was a command that just repeats your program after it finishes going through. (Instead of closing). Any fast help would be great.

Link to comment
Share on other sites

I had some help from a friend, but now hes offline. Heres where i got to:

#include <Misc.au3>

$dll = DllOpen("user32.dll")




    
    While 1
    Sleep ( 0 )
    If _IsPressed("01", $dll) Then
        $i = 1
        ExitLoop
    EndIf
WEnd
DllClose($dll)

While $i < 10; Amount of times mouse button is clicked
   MouseClick("left")
   Sleep(500); Time between clicks in m/s (now 1sec)
   $i = $i+1
WEnd

I want the whole thing to repeat, when i put a while loop around it, it doesnt seem to work, maybe im doing it wrong.

Link to comment
Share on other sites

#include <Misc.au3>

$dll = DllOpen("user32.dll")
While 1
    While 1
        Sleep(100)
        If _IsPressed("01", $dll) Then
            $i = 1
            ExitLoop
        EndIf
    WEnd

    While $i < 10; Amount of times mouse button is clicked
       MouseClick("left")
       Sleep(500); Time between clicks in m/s (now 1sec)
       $i = $i+1
    WEnd
WEnd
DllClose($dll)

That should work. I didn't test it though.

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
 Share

  • Recently Browsing   0 members

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