Well, if you want Firefox to restore even when minimized, you'll need a few more things:
Global Lua: (if not already defined!)user32 = alien.core.load("user32.dll")
-- ************ IsIconic (if window minimized) ************
gIsIconic = user32.IsIconic
gIsIconic:types{ ret = 'long', abi = 'stdcall', 'long'}
function aIsIconic(iWnd)
return gIsIconic(iWnd)
end
Action Script:local hFFox = acFindWindowByTitleRegex(".* - Mozilla Firefox")
if hFFox ~= 0 then
if gIsIconic(hFFox) == 1 then
acRestoreWindow(hFFox)
end
acActivateWindow(hFFox, 0, 0, 0)
end