Opened 3 years ago
Closed 2 years ago
#3974 closed Bug (Works For Me)
Key Stuck when using HotKeySet + Send
| Reported by: | anonymous | Owned by: | Jon |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.15.5 | Severity: | None |
| Keywords: | Cc: |
Description
Problem Description:
When I set Hotkeys to CTRL+ALT+t to a function, that sends("text"), the CTRL and ALT key get stucked.
I tried to send all various combinations to unlock the stuck keys, eg.: {LALT}{ALTUP}{LCTRL}{CTRLDOWN}{CTRLUP}.....
The only thing that fixes the stuck key is to physically press CTRL then ALT on my keyboard.
Code Example:
HotKeySet("!t","passwordsend")
$pwd = "PASSWORD"
While 1
Sleep(100)
WEnd
Func passwordsend()
$temp = ClipGet()
send($pwd)
ClipPut($temp)
EndFunc
Attachments (0)
Change History (7)
comment:1 by , 3 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
comment:2 by , 3 years ago
Ok, the _SendEx is worling.
I was only testing this...
ControlSend("", "", "", "text", 0)
Thanks!
comment:3 by , 3 years ago
| Resolution: | No Bug |
|---|---|
| Status: | closed → reopened |
In fact the pb come from the function executed before the release of the hotkey
If you add a Sleep(250) before the send that's work too
I will ask Jon if such go around can be integrated before startin a hotkey function
Cheers
comment:4 by , 3 years ago
| Owner: | set to |
|---|---|
| Status: | reopened → assigned |
comment:5 by , 3 years ago
| Owner: | changed from to |
|---|
In fact I found how to check that hotkey is un pressed
so I sent the fix to Jon
comment:6 by , 2 years ago
| Owner: | changed from to |
|---|
comment:7 by , 2 years ago
| Resolution: | → Works For Me |
|---|---|
| Status: | assigned → closed |
I recheck with the following script and Ii is working
So I close it with "works for me"
so if you encounter a pb please open a new tcket with a repro script
HotKeySet("{ESC}", "_Exit")
HotKeySet("^!t", "passwordsend")
Global $g_sPwd = "PASSWORD (" & @AutoItVersion & ")" & @CR
Run("notepad.exe")
Global $g_hNotepad = WinWaitActive("[CLASS:Notepad]", "")
While 1
Sleep(100)
WEnd
Func passwordsend()
;~ Local $temp = ClipGet()
;~ Sleep(150)
Send($g_sPwd)
;~ ClipPut($temp)
EndFunc ;==>passwordsend
Func _Exit()
Send("^z")
WinClose($g_hNotepad)
Exit
EndFunc ;==>_Exit

PLease use the forum for questions and read the Wiki FAQ: https://www.autoitscript.com/wiki/FAQ#Why_does_the_Ctrl_key_get_stuck_down_after_I_run_my_script?