Jump to content
Sign in to follow this  
belvedere

Sequence

Recommended Posts

belvedere

Hey guys, I was trying to make a sequence using a hotkey each time it is pressed it send random letters, my code isnt working, but at least you can understand what i mean.

Do
                If _IsPressed("2D") Then
            Send("a")
        EndIf
        Sleep(1000)
    Until Sleep(1000)
    
    Do
            If _IsPressed("2D") Then
            Send("b")
        EndIf
    Until Sleep(1000)

Share this post


Link to post
Share on other sites
jaberwacky

Will this do?

HotKeySet("{INS}", "SendChar")

While True
    Sleep(10)
WEnd

Func SendChar()

    Local $char = Random(97, 98, 1)

    Return Send(Chr($char), 1)
EndFunc ;==>SendChar

Share this post


Link to post
Share on other sites
belvedere

Will this do?

HotKeySet("{INS}", "SendChar")

While True
    Sleep(10)
WEnd

Func SendChar()

    Local $char = Random(97, 98, 1)

    Return Send(Chr($char), 1)
EndFunc ;==>SendChar

it works, but i dont want it randomical, i want a sequence, 'a' then if press 'ins' again send 'b' if press 'ins' again go back to 'a'

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  

×