AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Not show menu when firefox is inactive window

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
raven-gm



Joined: 25 Mar 2007
Posts: 24

PostPosted: Sun Nov 18, 2007 11:21 pm    Post subject: Not show menu when firefox is inactive window Reply with quote

So I have this cute little program that makes a few menu changes periodically in firefox, but every time it does it, it opens the menu over whatever window I'm in. Not such a big concern for most of the time, but really a problem when I'm using word or any application that requires a resolution change (games).

Is there any quick fix for this? (Keep in mind that firefox is not standard in that you cannot use WinMenuSelectItem, otherwise I wouldn't be having this problem at all).

Code:
SetTitleMatchMode,2
SendMode,Input
;Winactivate,Firefox
SetKeyDelay,30, 30
loop
loop,4
{

A_Number := A_Index
A_Number --
sleep,10000
ControlSend,,{Alt down}t{Alt up}{Up 2}{enter}{down %A_Number%}{enter}{esc},Firefox
IfWinExist,Tab Mix Plus Options
  WinKill,Tab Mix Plus Options
}

_________________
I would like to think that I know what I'm doing, but there's just to much stuff I've yet to learn...
Back to top
View user's profile Send private message AIM Address
Lexikos



Joined: 17 Oct 2006
Posts: 2558
Location: Australia, Qld

PostPosted: Mon Nov 19, 2007 1:00 am    Post subject: Reply with quote

Use WinWaitActive after the Sleep.
Back to top
View user's profile Send private message
raven-gm



Joined: 25 Mar 2007
Posts: 24

PostPosted: Mon Nov 19, 2007 1:43 am    Post subject: Reply with quote

...that actually doesn't fix the problem; if I do that, then it doesn't make the menu switch at all when I'm doing something else, which is the problem I'm trying to work around.
_________________
I would like to think that I know what I'm doing, but there's just to much stuff I've yet to learn...
Back to top
View user's profile Send private message AIM Address
Lexikos



Joined: 17 Oct 2006
Posts: 2558
Location: Australia, Qld

PostPosted: Mon Nov 19, 2007 4:43 am    Post subject: Reply with quote

Ah, so you want to interact with the menu in the background? I believe that is not possible. The only alternative might be to write an extension for Firefox to do what you want. (Of course, that has nothing to do with AutoHotkey.)
Back to top
View user's profile Send private message
raven-gm



Joined: 25 Mar 2007
Posts: 24

PostPosted: Mon Nov 19, 2007 5:19 am    Post subject: Reply with quote

no, I want the script to make the menu changes in the background, regardless of what I'm doing.
_________________
I would like to think that I know what I'm doing, but there's just to much stuff I've yet to learn...
Back to top
View user's profile Send private message AIM Address
Lexikos



Joined: 17 Oct 2006
Posts: 2558
Location: Australia, Qld

PostPosted: Mon Nov 19, 2007 7:24 am    Post subject: Reply with quote

In your script, {Alt down}t{Alt up} opens the menu, and {Up 2}{enter} interacts with it. Thus, you want to interact with the menu in the background (i.e. without activating it), as I said. {Alt down}t{Alt up} will always open the menu in the foreground (i.e. will activate it), which is why I believe what you want is not possible.

I suppose the {down %A_Number%}{enter}{esc} part interacts with Tab Mix Plus Options, which no doubt is also in the foreground (i.e. it is the active window.) I overlooked this earlier, though it's not really any different to a menu. (I believe Firefox menus and dialogs are implemented with JavaScript.)

On the other hand, if you wrote a Firefox extension, you should have access to whatever it is the menu (and Options dialog) does, so you won't need to use the menu (or Options dialog.) It would achieve a similar effect, but would not actually interacting with any menus or Tab Mix Plus Options dialog.

Out of curiosity, what does the script actually do?
Back to top
View user's profile Send private message
raven-gm



Joined: 25 Mar 2007
Posts: 24

PostPosted: Mon Nov 19, 2007 4:01 pm    Post subject: Reply with quote

It uses the cookieswapper extension to change cookiesets every 10 seconds. Just a little utility to automate some background browsing...
I guess I see what you mean... Meh, I don't have enough time to learn how to write Firefox extensions, so I'll just leave it the way it is.

The Tab Mix Plus thing is separate, actually; the whole script operates solely within a menu, I just close the Tab Mix Plus window because the script can accidentally open it if it misfires.

Thanks for the info though.
_________________
I would like to think that I know what I'm doing, but there's just to much stuff I've yet to learn...
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group