#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