resis Posted May 19, 2018 Posted May 19, 2018 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?
Developers Jos Posted May 19, 2018 Developers Posted May 19, 2018 What about something as simple as this?: HotKeySet("!a", "_Q1") While 1 Sleep(10) WEnd Func _Q1() Send("ä", 1) EndFunc Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
resis Posted May 19, 2018 Author Posted May 19, 2018 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.
Developers Jos Posted May 19, 2018 Developers Posted May 19, 2018 No effect on which program as it does work for me with SciTE. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
resis Posted May 19, 2018 Author Posted May 19, 2018 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. :/
Developers Jos Posted May 19, 2018 Developers Posted May 19, 2018 1 minute ago, resis said: In autohotkey the code is as simple as this; !a::ä, and I can spam it as much as I want. SPAM what? . SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
resis Posted May 19, 2018 Author Posted May 19, 2018 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now