This App is No Longer Maintained. Visit the Replacement at StrokesPlus.net

StrokesPlus Forum
                       
StrokesPlus Forum
Home | Profile | Active Topics
Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General Discussion
 General Discussion
 Script for Firefox in application bar
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

patrickcas

26 Posts

Posted - 08/01/2015 :  10:24:45  Show Profile
Hi everyone.

Let's suppose I have some icons (both folders and programs) in the application bar, and the one visible on screen (active) is NOT Firefox (which is in the bar).

I would like to create a script for bringing Firefox on focus and visible (the current window obviously must go background or in the application bar (if possible, please write the two scripts).

Thank you very much and a big Ciao from Italy!

Rob

USA
2615 Posts

Posted - 08/02/2015 :  03:43:25  Show Profile  Visit Rob's Homepage
This brings Firefox in focus on my machine:
acActivateWindow(acFindWindowByTitleRegex(".* - Mozilla Firefox"), 0, 0, 0)
Go to Top of Page

Rob

USA
2615 Posts

Posted - 08/02/2015 :  03:54:40  Show Profile  Visit Rob's Homepage
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
Go to Top of Page

patrickcas

26 Posts

Posted - 08/03/2015 :  09:32:51  Show Profile
WOW! This is really beyond..... everything! Amazing!!!

I tried both, and they work perfectly!!!

Thank you VERY MUCH!

Ciao from Italy!
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000