Jump to content

WinActivate Question With Firefox


Recommended Posts

Hi guys. I know this is a really technical forum, how do I know? I don't understand 99% of the topics here and my question is so basic I don't think anyone would ever ask it and after searching for a long time I decided to just be humble and just ask how to solve this problem I have with WinActivate.

Basically the only WinActivate function I can get to work is the example on the function list page. (Google: "autoit function list" [i'm Feeling Lucky])

But that just activates the Notepad in its most basic form. I'm trying to activate a Firefox Tab inside Firefox which reads "Samurai of Legend - Mozilla Firefox" on the blue bar at the top of the screen but no matter what I type in the parenthesis after WinActivate I just cannot get it to work, if anyone answers I will be grateful and will probably have an "Oh, of course." moment.

Thanks in advance.

Link to comment
Share on other sites

maybe send ctrl+tab ("^{tab}") until the window has the correct name

example:

While WinGetTitle("") <> "Samurai of Legend - Mozilla Firefox"   ;;; the loop continues until the correct tab is open
    send("^{tab}") ;;; ctrl+tab switches the tab in firefox (ctrl+pageup or ctrl+pagedown should work too)
    sleep(100)
WEnd

EDIT: added example

Edited by protoid
Link to comment
Share on other sites

maybe send ctrl+tab ("^{tab}") until the window has the correct name

Hmm I could try that until I find a better alternative with less steps.

That's my goal right now, minimal steps because I know (pretty sure) its a one-step process, I'm just a noob =(

edit: Fooled around with it, if the window is minimized Ctrl+Tab does nothing so I would have to Alt+Tab in order to bring the window up first. I could run it using Alt+Tab until the window is active but since I cannot use WinActivate I doubt I will be able to use WinActive to test for active windows. since the commands are nearly identical.

Edited by myxomatosii
Link to comment
Share on other sites

...but since I cannot use WinActivate

here:

Opt("WinTextMatchMode", 2)    ;this lets you activate a window without using the whole name
WinActivate("Mozilla Firefox")

you have to activate Firefox and the tab separately- autoit doesn't see a tab as a window

Edited by protoid
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...