Jump to content

bitingsock

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by bitingsock

  1. I've discovered if I put a sleep(1000) in between $previouswindow = WinGetHandle("[active]")and WinActivate("Ventrilo Dictator")it prevents the problem so this may be a higher level bug and not directly something with the UDF. EDIT: ya it looks like it has something to do with having the key down when switching windows; I changed my popup() to Func popup() If WinGetHandle("[active]") = $Form1 Then If $previouswindow <> 0 Then While _IsPressed("11") or _IsPressed("0D") Sleep(10) WEnd WinActivate($previouswindow) EndIf Else $previouswindow = WinGetHandle("[active]") While _IsPressed("11") or _IsPressed("0D") Sleep(10) WEnd WinActivate($Form1) WinSetOnTop($Form1, "", 1) ControlFocus($Form1, "", $Input1) WinSetOnTop($Form1, "", 0) EndIf EndFunc seems to fix my problem
  2. #RequireAdmin #include <HotKey_21b.au3> #include <vkConstants.au3> Opt("GuiOnEventMode", 1) $Form1 = GUICreate("Ventrilo Dictator", 530, 60, -1, -1, -1) GUICtrlCreateLabel("Set a comment", 3, 0, 530, 17) GUICtrlCreateLabel("Ctrl+Enter for popup mode", 400, 0, 150, 20) $Input1 = GUICtrlCreateInput("", 3, 20, 450, 21) $Button1 = GUICtrlCreateButton("Set", 460, 20, 30, 21) _HotKey_Assign(BitOR($CK_CONTROL, $VK_RETURN), 'popup') $Button2 = GUICtrlCreateButton("clear", 490, 20, 30, 21) GUISetState(@SW_SHOW, $Form1) $tts = "" $previouswindow = 0 ControlFocus("Ventrilo Dictator", "", $Input1) While 1 Sleep(30) WEnd Func popup() If WinGetHandle("[active]") = $Form1 Then If $previouswindow <> 0 Then WinActivate($previouswindow) Else $previouswindow = WinGetHandle("[active]") WinActivate("Ventrilo Dictator") WinSetOnTop($Form1, "", 1) ControlFocus("Ventrilo Dictator", "", $Input1) WinSetOnTop($Form1, "", 0) EndIf EndFuncHere is a slimmed down version of my project. I will note the problem is now cleared by pressing the right control key afterwards (sometimes, I think) Try to type something into the gui this creates and you may notice the problem? I am on Win8.1 x64 btw
  3. I am experiencing a very frustrating bug. _HotKey_Assign(BitOR($CK_CONTROL, $VK_RETURN), 'popup')When I try to activate the hotkey using the right control key, my keyboard continues to behave as if the control key has been left down. If I press the left control key and release it fixes it until I use the hotkey again. Pressing the right control key at that time does not fix the problem; only if I press the left control key. If I activate the hotkey using the left control key the problem is not exhibited.
×
×
  • Create New...