Jump to content

Recommended Posts

Posted

Well i made a simple script to convert my F key in DOWN - RIGHT - E but the problem is that it keeps looping i mean if i hold F it keeps doing it and is there any way i can make it so it doesnt loop so i just have to press it every time it does down - right -e? its for a simple fighting game

Func f()

send("{DOWN}")

sleep(19)

Send("{LEFT}")

sleep(19)

Send("e")

EndFunc

Posted (edited)

Well i made a simple script to convert my F key in DOWN - RIGHT - E but the problem is that it keeps looping i mean if i hold F it keeps doing it and is there any way i can make it so it doesnt loop so i just have to press it every time it does down - right -e? its for a simple fighting game

Func f()

send("{DOWN}")

sleep(19)

Send("{LEFT}")

sleep(19)

Send("e")

EndFunc

Have a look at _IsPressed in the help file

Either of these to methods should achieve what you require.

Method 1

#Include <Misc.u3>

HotKeySet("f","f")

While 1
        Sleep(100)  
WEnd

Func f()
    HotKeySet("f")
    send("{DOWN}")
    sleep(19)
    Send("{LEFT}")
    sleep(19)
    Send("e")
    While _IsPressed("46")
        Sleep(100)
    WEnd
    HotKeySet("f","f")
EndFuncoÝ÷ ØÇ­vjëh×6#Include <Misc.u3>

HotKeySet("f","f")

While 1
        Sleep(100)  
WEnd


Func f()
    BlockInput(1)
    send("{DOWN}")
    sleep(19)
    Send("{LEFT}")
    sleep(19)
    Send("e")
    While _IsPressed("46")
        Sleep(100)
    WEnd
    BlockInput(0)
EndFunc

Bowmore

Edited by Bowmore

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Posted

Have a look at _IsPressed in the help file

Either of these to methods should achieve what you require.

Method 1

#Include <Misc.u3>

HotKeySet("f","f")

While 1
        Sleep(100)  
WEnd

Func f()
    HotKeySet("f")
    send("{DOWN}")
    sleep(19)
    Send("{LEFT}")
    sleep(19)
    Send("e")
    While _IsPressed("46")
        Sleep(100)
    WEnd
    HotKeySet("f","f")
EndFuncoÝ÷ ØÇ­vjëh×6#Include <Misc.u3>

HotKeySet("f","f")

While 1
        Sleep(100)  
WEnd
Func f()
    BlockInput(1)
    send("{DOWN}")
    sleep(19)
    Send("{LEFT}")
    sleep(19)
    Send("e")
    While _IsPressed("46")
        Sleep(100)
    WEnd
    BlockInput(0)
EndFunc

So what am i doing wrong?

Posted

add "#Include <Misc.Au3>" to the top of ur script

There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly

Posted

why not just change it to activate when you press the button down. wouldnt this cause it to only activate once per press?

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
×
×
  • Create New...