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,363 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
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 how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

739 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