Modify

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 Jos, 3 years ago

Resolution: No Bug
Status: newclosed

comment:2 by g.mandl@…, 3 years ago

Ok, the _SendEx is worling.

I was only testing this...
ControlSend("", "", "", "text", 0)

Thanks!

comment:3 by J-Paul Mesnage, 3 years ago

Resolution: No Bug
Status: closedreopened

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 J-Paul Mesnage, 3 years ago

Owner: set to Jon
Status: reopenedassigned

comment:5 by J-Paul Mesnage, 3 years ago

Owner: changed from Jon to J-Paul Mesnage

In fact I found how to check that hotkey is un pressed
so I sent the fix to Jon

comment:6 by J-Paul Mesnage, 2 years ago

Owner: changed from J-Paul Mesnage to Jon

comment:7 by J-Paul Mesnage, 2 years ago

Resolution: Works For Me
Status: assignedclosed

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

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.