Is Autohokeys causing unwanted switch to overtype ?

Get help with using AutoHotkey and its commands and hotkeys
Sebastian42
Posts: 28
Joined: 10 Mar 2019, 23:42

Is Autohokeys causing unwanted switch to overtype ?

25 Apr 2019, 01:04

I have used Autohotkeys for years. More recently I've been experiencing unwanted random switching from INSERT to OVERTYPE - in documents, chats, mail and elsewhere. Swapping keyboards, and their connections (PS/2 v USB) has left the problem intact. A dozen HELP forums have been unable to give me a solution, but my latest inquiring triggered 'Are you using a text-insert program ?' - and I am. It's called Autohotkeys. So I am asking here, can anyone see a way that AutoHotkeys may be causing my problem ?
Rohwedder
Posts: 2309
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Is Autohokeys causing unwanted switch to overtype ?

25 Apr 2019, 03:14

Hallo,
that of course depends on the autohotkey scripts you run.
If you don't want OVERTYPE, try:

Code: Select all

SetTimer, OverType, 1000
Return
OverType:
IF GetKeyState("Ins","T")
	Send, {Ins}
Return
#IF !GetKeyState("Ins","T")
Ins::Return
#IF
Sebastian42
Posts: 28
Joined: 10 Mar 2019, 23:42

Re: Is Autohokeys causing unwanted switch to overtype ?

27 Apr 2019, 05:16

It is not that I do not want overtype - it is that I do not want it switched on at random.
Osprey
Posts: 453
Joined: 18 Nov 2017, 05:50

Re: Is Autohokeys causing unwanted switch to overtype ?

27 Apr 2019, 15:58

I've had this happen several times while testing my Autohotkey scripts. I don't know why it happens, since I don't usually use the Insert key in my scripts. It could be as simple as me accidentally pressing Insert or maybe it's an example of keyboard ghosting, where pressing a bunch of keys at once (something which is more common when scripting keypresses) sends one that wasn't pressed. Anyways, this probably doesn't help much, but I just wanted you to know that you're not the only one who's had this happen.
swagfag
Posts: 3006
Joined: 11 Jan 2017, 17:59

Re: Is Autohokeys causing unwanted switch to overtype ?

27 Apr 2019, 18:37

well, what kinda scripts are u running?
and btw though it may seems random, it likely isnt. try to pinpoint what u were doing exactly the last time it got switched. clues, look for them
check the keyhistory pane
Sebastian42
Posts: 28
Joined: 10 Mar 2019, 23:42

Re: Is Autohokeys causing unwanted switch to overtype ?

29 Apr 2019, 06:00

The kind of scripts I run - some 50 of them - are pressing a windows key and another to insert a string of text. I also have a script to close save and close spreadsheets.

"check the keyhistory pane" - please introduce me to that; never heard of it before. Googling it revealed a code "keybdhook:" Does that have to appear in every script ?
Last edited by Sebastian42 on 29 Apr 2019, 06:17, edited 1 time in total.
Sebastian42
Posts: 28
Joined: 10 Mar 2019, 23:42

Re: Is Autohokeys causing unwanted switch to overtype ?

29 Apr 2019, 06:10

Osprey wrote:
27 Apr 2019, 15:58
I've had this happen several times while testing my Autohotkey scripts. I don't know why it happens, since I don't usually use the Insert key in my scripts. It could be as simple as me accidentally pressing Insert or maybe it's an example of keyboard ghosting, where pressing a bunch of keys at once (something which is more common when scripting keypresses) sends one that wasn't pressed. Anyways, this probably doesn't help much, but I just wanted you to know that you're not the only one who's had this happen.
On the contrary, hearing that I am not alone is very useful. I agree with your reasoning - however, it implies that the unwanted switch should follow on the use of an autokey hotkey. That is NOT the case. It happens during typing text.
Rohwedder
Posts: 2309
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Is Autohokeys causing unwanted switch to overtype ?

29 Apr 2019, 08:42

Hallo,
I don't know any unwanted switching from INSERT to OVERTYPE.
However, I usually only have 3 scripts running at the same time (main script, keylogger and an experimental script).
Maybe this will help against this keyboard ghosting:

Code: Select all

*Ins:: ;Sends Ins only if physically pressed
IF GetKeyState("Ins","P")
	Send, {Blind}{Ins}
Return
^#!k::Keyhistory ;to check the keyhistory pan
Sebastian42
Posts: 28
Joined: 10 Mar 2019, 23:42

Re: Is Autohokeys causing unwanted switch to overtype ?

29 Apr 2019, 23:18

I have added a shortcut to that script into the StartUp folder - and am hoping for the best.
Sebastian42
Posts: 28
Joined: 10 Mar 2019, 23:42

Re: Is Autohokeys causing unwanted switch to overtype ?

29 Apr 2019, 23:55

As stated above, I added that code of your into StartUp and it triggered an error message which I would like to post a snap of, but don't know how to achieve that.The text in it runs as follows : Error at line 1.
Line Text: Code: Select all
Error: This line does not contain a recognized action.
The program will exit.
gregster
Posts: 3298
Joined: 30 Sep 2013, 06:48

Re: Is Autohokeys causing unwanted switch to overtype ?

30 Apr 2019, 00:07

Code: Select all is not part of the code but of the forum codebox that contains the code (that means, you shouldn't copy that line - on the contrary, if you click 'Select All', it will actually select all the code in codebox, ready for you to copy.)

Code: Select all

; Only this here is the code area of the codebox, nothing above
; Try to click 'Select All'

Codeboxes can be inserted with [code][/code] tags in posts and are highly recommended to make code look better; commands are clickable in the codebox and will link to the corresponding docs and indentation via tabs is possible.
Sebastian42
Posts: 28
Joined: 10 Mar 2019, 23:42

Re: Is Autohokeys causing unwanted switch to overtype ?

30 Apr 2019, 06:00

I tested clicking 'select all' and sure enough that is what happened.
I have added the code to a batch file in the StartUp folder which used to launch Autohotkeys and an ahk.
If I do not get an error code at reboot, it will be a matter of time to see if random switching to overtype still occurs.
I guess this is the end of the thread, unless I report an error message or the nuisance continuing despite your best efforts.
Sebastian42
Posts: 28
Joined: 10 Mar 2019, 23:42

Re: Is Autohokeys causing unwanted switch to overtype ?

01 May 2019, 02:56

There is no error message, and so far INSERT has not been changed to Overtype - so this might be the solution I was looking for.
Sebastian42
Posts: 28
Joined: 10 Mar 2019, 23:42

Re: Is Autohokeys causing unwanted switch to overtype ?

01 May 2019, 20:48

Sad to say, INSERT is still switching randomly (?) to Overtype, so the above was not a solution. Does that mean Autohotkeys is NOT implicated in the fault ?

Return to “Ask For Help”

Who is online

Users browsing this forum: No registered users and 233 guests