Solved

How do you tell AutoIt to choose a specific browser tab if multiple IE tabs are already open?

Posted on 2014-01-25
4
6,239 Views
Last Modified: 2014-01-25
I need to find the command to tell AutoIT to choose a specific browser tab.

For example.  If I have a browser open with Google in the First tab, MSN in the second tab and YouTube in the third tab.  I want to autoit to choose YouTube tab and then perform actions  in that specific tab.  What command do you use in AutoIt.  Any help is greatly appreciated.
0
Comment
Question by:kwh3856
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 35

Accepted Solution

by:
Dan Craciun earned 500 total points
ID: 39809101
Maybe something like this:
AutoItSetOption("WinTitleMatchMode", 2)

$searchString = "YouTube"

WinActivate("Chrome")
For $i = 0 To 100
    Send("^" & $i)
    Sleep(250)
    If Not(StringInStr(WinGetTitle("[ACTIVE]"), $searchString) = 0) Then
        \\your code here
        ExitLoop
    EndIf
Next

Open in new window


HTH,
Dan
0
 

Author Comment

by:kwh3856
ID: 39809102
That Rocks!!!!!

I did not even know you could do Ctrl-1, Ctrl-2 etc... to move through the tabs.

Thanks!!!!!!
0
 

Author Closing Comment

by:kwh3856
ID: 39809103
AWESOME!!!!!!!
0
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 39809107
Glad I could help :)
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question