2012-08-03, 19:49
Hello. Im not completely new to programming languages. I can compose HTML and CSS in my sleep.
However, I seem to be having issues figuring out exactly how to execute my desired outcome using auto hotkey.
My current project is to create a simple script to activate a minimized firefox window (if it exists), otherwise, launch firefox.
I've got the script compiled to an exe so that XBMC's Launcher program can launch it.
The file is located in D:/ahk/launchffx.exe (the script is in there as well "launchffx.ahk")
Here's my current script:
What ends up happening is this: If the window doesn't exist, firefox is launched. If the window exists, it is activated.
BUT ONLY FOR A SECOND BEFORE XBMC RECLAIMS THE FOCUS! WTF?!
not sure if this is important, but Im using Windows 7 with XBMC 11.0 in Fullscreen Window mode
However, I seem to be having issues figuring out exactly how to execute my desired outcome using auto hotkey.
My current project is to create a simple script to activate a minimized firefox window (if it exists), otherwise, launch firefox.
I've got the script compiled to an exe so that XBMC's Launcher program can launch it.
The file is located in D:/ahk/launchffx.exe (the script is in there as well "launchffx.ahk")
Here's my current script:
Code:
IFWINEXIST ahk_class MozillaWindowClass
{
WINACTIVATE
}
ELSE
{
RUN "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
WINWAIT ahk_class MozillaWindowClass
WINACTIVATE
}
What ends up happening is this: If the window doesn't exist, firefox is launched. If the window exists, it is activated.
BUT ONLY FOR A SECOND BEFORE XBMC RECLAIMS THE FOCUS! WTF?!
not sure if this is important, but Im using Windows 7 with XBMC 11.0 in Fullscreen Window mode