Sign in to follow this  
Followers 0
docsaintly

Gimme some pointers :-\

6 posts in this topic

I've read various forums about hotkeys and have obtained little bits of the code that I need to complete what i'm doing. I'm trying to make it so that i can program a key to push left then right really fast until i let go, or if it is possible to toggle that would work too. I also want to program other keys to do key combos, like up down left right or something. Could anyone show me a few scripts with this in it or just tell me here what code to use? I'd greatly appreciate it. THank you for your time.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

here is a script that randomly sends them:

HotKeySet("{F9}", "Close")
GLobal $avKeys[4] = ["{LEFT}", "{RIGHT}", "{DOWN}", "{UP}"]
While 1
        sleep(100)
    Send($avKeys[Random(0, 3, 1)])
WEnd
Func Close()
Exit
EndFUnc
oÝ÷ ÚØb²Ç§vËazh§¢·^¬±M0ÎXÕjw¢{b笶h²®¶­s`¤tÆö&Âb33c¶d¶W5³EÒÒ²gV÷C·´ÄTeGÒgV÷C²ÂgV÷C·µ$tGÒgV÷C²ÂgV÷C·´DõtçÒgV÷C²ÂgV÷C·µUÒgV÷CµÐ¤vÆö&Âb33c¶Ò¥vÆR bb33c¶ÓÒ2FVà b33c¶Ò VæD` 6VæBb33c¶d¶W5µ&æFöÒÂ2ÂÒ b33c¶³Ò¥tVæ@
Edited by CHRIS95219

Share this post


Link to post
Share on other sites

Thanks that helps a lot,

Share this post


Link to post
Share on other sites

HotKeySet("{F1}", "leftright")
HotKeySet("{F3}", "Terminate")
GLobal $avKeys[2] = ["{LEFT}", "{RIGHT}"]
Global $i = 0
While 1
    Sleep(100)
WEnd

Func leftright()
    While $i <= 100
        Send($avKeys)
        $i += 1
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

It wont let me run this... Why not?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

First, a For loop is more effective. Second, you need to put [0] or [1] in the send after $avKeys to tell it to use that dimension of the array.

HotKeySet("{F1}", "leftright")
HotKeySet("{F3}", "Terminate")
GLobal $avKeys[2] = ["{LEFT}", "{RIGHT}"]
Global $i = 0
While 1
    Sleep(100)
WEnd

Func leftright()
    For $n = 1 To 100
        Send($avKeys[0] & $avKeys[1])
    Next
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc
Edited by Xenogis

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Share this post


Link to post
Share on other sites

Thanks that does help, but i found out that the reason is because when i saved the file it didn't save it as au3 so it wouldn't build the script.l

Share this post


Link to post
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
Sign in to follow this  
Followers 0