Jump to content

while wend key down help


Recommended Posts

im trying to get the right arrow key to be held down while another script is running involving Up arrow presses. now i had this happen however the script constantly repeated the loop until exiting it. Ive read all through help and previous posts and can't seem to locate a similar script i could study for how this is done.

this one posted all its doing is holding the right arrow down without following the script underneath it, im presuming due to where i put the wend, if i relocate that to beneath the full script it eternal loops, oddly enough i think i just answered my own question and i need to put a stop function somewhere..or im way off track any help is appreciated

func start()
            While 1
                Send("{Right Down}")
                wend
        $Stopped = false



        sleep(GUICTRLRead($Input0)*1000)
        send("{UP}")
        Mouseup("left")
        Sleep(1)
        Mousedown("left")
        sleep(1)
        if $Stopped = true then return(0)
        sleep(GUICTRLRead($Input1)*1000)
        send("{UP}")
        if $Stopped = true then return(0)
        sleep(GUICTRLRead($Input2)*1000)
        send("{UP}")
        if $Stopped = true then return(0)
        sleep(GUICTRLRead($Input3)*1000)
        send("{UP}")
        if $Stopped = true then return(0)
        sleep(GUICTRLRead($Input4)*1000)
        send("{UP}")
        if $Stopped = true then return(0)
        sleep(GUICTRLRead($Input5)*1000)
        send("{UP}")
        if $Stopped = true then return(0)
        sleep(GUICTRLRead($Input6)*1000)
        send("{UP}")
        Send("{Right Up}")
        EndFunc

        func stop()
           $Stopped = true
           msgbox(0,"","Stopped")
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...