Jump to content

Recommended Posts

Posted

I am trying to write a script, where I can use the LAlt+a combo to type down the umlaut letter ä (or the Alt+132 code for that letter).

I wrote a script that is probably totally off, but I can't find any help and am not getting any further.
 

#include <Misc.au3>
    HotKeySet("lalt", "_Q1")
    HotKeySet("a", "_Q1")

While 1
    Sleep(10)
WEnd

Func _Q1()
    HotKeySet("lalt")
    HotKeySet("a")

    $iBegin = TimerInit()
        Do
            If _IsPressed("lalt") And _IsPressed("a") Then Send("ä", 1)
        Until TimerDiff($iBegin) > 100

    HotKeySet("lalt", "_Q1")
    HotKeySet("a", "_Q1")
EndFunc


Any ideas?

Posted

Doesn't work :(

Just in case I made a mistake there, Tools/Compile and then I run the .exe, right? I see it in the task, but it has no effect. 

Posted

SciTE is it. I tried with a normal letter and it works. For some reason it refuses to write down the umlaut, but also if I press it fast, it gives me an error sound every few combo presses. Probably because of the sleep.

I might need to use the !132 result upon the !a function I guess. In autohotkey the code is as simple as this; !a::ä, and I can spam it as much as I want. It's just that I need this one in AutoIt. :/

Posted

The key combination I meant. With autohotkey I can press the key combo as fast as I want, but in AutoIt it doesn't seem to like it and gives me an error sound every few presses.

I went back to autohotkey for this one, but if someone still has ideas, might be useful for others seeking help, so I keep the question open. Thanks Jos for the help.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...