Code: Select all
$1::
PixelGetColor, color, 56, 284, RGB
If color = 0x008000
{
WinRestore, ahk_exe AkelPad.exe
IfWinNotActive ahk_class QWidget
{
WinActivate, ^.*Engvidshortcut.*$
}
Send 1
ControlClick, x60 y150, ahk_class QWidget,, Left, 1, NA
1. Why does WinActivate, ^.*Engvidshortcut.*$ work even though there is no SetTitleMatchMode, RegEx command at the beginning of the script?
2. Why does WinActivate, ^. * Engvidshortcut. * $ оnly work if I use IfWinNotActive ahk_class QWidget? (ahk_class QWidget and WinActivate, ^. * Engvidshortcut. * $ are equivalent).
3. Why does WinRestore, ahk_exe AkelPad.exe restore the window only if the command WinMinimize, ahk_exe AkelPad.exe was used before? If I just minimize the window by clicking in the upper right corner, then WinRestore, ahk_exe AkelPad.exe does not work.
4. And the last question, why is ControlClick, x60 y150, ahk_class QWidget,, Left, 1, NA not working if the window is not active?