Reputation: 669
I have this program called hot virtual keyboard, and I am trying to WinActivate it. Because its behavior is always on top similar to windows on-screen keyboard, and its existence is in the icon tray, it kind of hangs around in the background (inaccessible via task bar), and I cannot figure out a way for me to bring it to front via AHK.
I have tried:
DetectHiddenWindows, on
#h::WinActivate, ahk_class TMainKeyboardForms
But to no avail it does not bring it to the front. Is there another special method that exists in AHK that brings these type of special windows to the front?
here is how the hot virtual keyboard developers show in other programming languages how they show the window for additional information.
Upvotes: 0
Views: 604
Reputation: 15498
DetectHiddenWindows, on
#h::
WinShow, ahk_class TMainKeyboardForms
Return
Upvotes: 0
Reputation: 2080
AutoHotkey has a PostMessage command just like the examples given in that link. The main difference is that there's no FindWindow function. Instead, PostMessage in AutoHotkey identifies windows using a WinTitle parameter. The window you need to post messages to has class "TFirstForm" and title "hvkFirstForm", so it can be matched like so:
DetectHiddenWindows On
WM_USER := 0x0400
; Message constants accepted by Hot Virtual Keyboard
WM_CSKEYBOARD := WM_USER + 192
WM_CSKEYBOARDMOVE := WM_USER + 193
WM_CSKEYBOARDRESIZE := WM_USER + 197
; Win+H -> show the keyboard
#h::PostMessage WM_CSKEYBOARD, 1, 0,, hvkFirstForm ahk_class TFirstForm
; Win+J -> Hide the keyboard
#j::PostMessage WM_CSKEYBOARD, 2, 0,, hvkFirstForm ahk_class TFirstForm
Upvotes: 1