AutoHotkey window class
-
Hi, I'm using AutoHotkey (http://www.autohotkey.com/) to automate my tasks. One task is to focus the browser window. For Chrome the macro is shown at https://github.com/koppor/autohotkey-scripts/blob/master/Chrome.ahk It checks for "ahk_class Chrome_WidgetWin_1" The issue is that Vivaldi also matches "ahk_class Chrome_WidgetWin_1" Is it possible to change the ahk_class of Vivaldi? TYIA Oliver
-
probably long too late for reply, I have a script to launch Vivaldi, or to focus on it if its open. Cos Vivaldi sets the window title to the website name in the foreground tab I've done it by pid instead which will probably work for you
AutoHotkey Script to launch focus on switch too Vivaldi, code is:
;Ctrl alt V vivaldi ^!v:: Process, Exist, vivaldi.exe vivaldiPID=%Errorlevel% if vivaldiPID WinActivate ahk_pid %vivaldiPID% else run vivaldi
or see instructions here (http://www.oceanhippie.net/content.php?Cat=6&Res=3587)
-
Just wanted to post my solution for this because it differs somewhat. Even if this thread is old others may want a similar solution for AHK and Vivaldi. I like this script for every window I have to show/minimize (without bugs), and for Vivaldi i use ahk_exe instead of class.
*ToggleWinMinimize(TheWindowTitle) { SetTitleMatchMode,2 DetectHiddenWindows, Off IfWinActive, %TheWindowTitle% { WinMinimize, %TheWindowTitle% } Else { IfWinExist, %TheWindowTitle% { WinGet, winid, ID, %TheWindowTitle% DllCall("SwitchToThisWindow", "UInt", winid, "UInt", 1) } } Return } numpad1::ToggleWinMinimize("ahk_exe vivaldi.exe") ;replace ahk_exe vivaldi.exe with Chrome, Notepad etc. for other programs ;replace numpad1 with your preferred key*
-
Ppafflick moved this topic from Vivaldi for Windows on