TheAmazingRak

HotkeySet isn't waiting for a key.

4 posts in this topic

Hi! I'm new in the AutoIt. I'm trying to make a hotkeys script, but one function does not works, like I'm want. I think it's "HotKeySet". It is not waiting for a key, it is just writing all hotkeys :(

Case $msg = $button2
      While 1
        for $number = 1 To 76 Step +1
          $letter = FileReadLine("charlist.txt", $number)
          HotKeySet($letter,reason($letter))
        Next
        Func reason($letter)
            for $line=1 To 19 Step +1
                if FileReadLine("hotkeys.txt", $line) = $letter Then
                    $text = FileReadLine("hotkeys.txt", $line+1)
                    Send($text)
                EndIf
            Next
        EndFunc
      WEnd

What I did bad?

Share this post


Link to post
Share on other sites

@TheAmazingRak your function needs to be outside the While/WEnd loop.


√-1 2^3 ∑ π, and it was delicious!

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