Modify

Opened 8 months ago

Closed 8 weeks 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 Changed 8 months ago by Jos

  • Resolution set to No Bug
  • Status changed from new to closed

comment:2 Changed 8 months ago by g.mandl@…

Ok, the _SendEx is worling.

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

Thanks!

comment:3 Changed 8 months ago by Jpm

  • Resolution No Bug deleted
  • Status changed from closed to 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 Changed 8 months ago by Jpm

  • Owner set to Jon
  • Status changed from reopened to assigned

comment:5 Changed 8 months ago by Jpm

  • Owner changed from Jon to Jpm

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

comment:6 Changed 2 months ago by Jpm

  • Owner changed from Jpm to Jon

comment:7 Changed 8 weeks ago by Jpm

  • Resolution set to Works For Me
  • Status changed from assigned to 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

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jon.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.