I am trying to get it to work while the screen is inactive, any help would be greatly appreciated.
Code: Select all
capslock::
SetTitleMatchMode, RegEx
loop
{
controlsend,,12345, ^$ ahk_class Chrome_WidgetWin_1,,,, NA
}
Code: Select all
capslock::
SetTitleMatchMode, RegEx
loop
{
controlsend,,12345, ^$ ahk_class Chrome_WidgetWin_1,,,, NA
}
Code: Select all
ControlSend , [Control, Keys, WinTitle, WinText, ExcludeTitle, ExcludeText]
Code: Select all
#Persistent
#NoEnv
#SingleInstance, Force
DetectHiddenWindows, On
SetTitleMatchMode, 2
controlID := 0
F2::
loop, 1
{
ControlGet, controlID, Hwnd,,Chrome_RenderWidgetHostHWND1, Google Chrome
ControlFocus,,ahk_id %controlID%
ControlSend, Chrome_RenderWidgetHostHWND1, {Ctrl Down}${Ctrl Up}, Google Chrome
}
return
F3::
reload
return
Code: Select all
ControlSend, Chrome_RenderWidgetHostHWND1, {1}{2}{3}{4}{5}{Ctrl Down}{$}{Ctrl Up}, Google Chrome
You mean, when the game is (or isn't) the active window? Well, there is no guarantee that a game or application will (fully) cooperate with ControlSend... but you should make sure that the inactive (Chrome) window is at least in the background - and not minimized.jasonakademia wrote:it only works when the screen is active.
I am trying to get it to work while the screen is inactive
Code: Select all
ControlFocus,, ahk_class Chrome_WidgetWin_1 ; worth a try, especially with Chrome browser
ControlSend,, 12345, ahk_class Chrome_WidgetWin_1
Code: Select all
ControlFocus, Chrome_RenderWidgetHostHWND1, ahk_class Chrome_WidgetWin_1
ControlSend, Chrome_RenderWidgetHostHWND1, 12345, ahk_class Chrome_WidgetWin_1
Users browsing this forum: No registered users and 51 guests