Jump to content

I want to start chrome, move to URL text window enter and address


 Share

Recommended Posts

Hello all, I am running windows 7 64 bit OS and latest version of chrome browser. I am

launching chrome in autoit but I need to control the cursor so that it is moved from the

default search window to the URL window box. Then I need to enter a string like

yahoo.com for example. I can use the window info and get class info but I can't figure

out what autoit tools will move the cursor and just how to enter text into the URL window box.

Thanks for looking at my post!!!

Link to comment
Share on other sites

$WindowSTR = "I want to start chrome, move to URL text window enter and address - General Help and Support - AutoIt Forums"
$URL = "www.yahoo.com"
$WindowSTR = $WindowSTR & " - Google Chrome"
WinActivate($WindowSTR)
WinWaitActive($WindowSTR)
ControlFocus($WindowSTR, "", "[ID:41470064]")
Send("^a")
Send("{DELETE}")
ControlSend($WindowSTR, "", "[ID:41470064]", $URL)
Send("{ENTER}")

Edited by GordonFreeman
Link to comment
Share on other sites

I finally tried the code and found that I can not get the cursor to go to the URL box. I noticed that I always see a different

control ID each time the browser is launched, I tried to find a command to fetch the control of an active window but failed

to find it. Looking at your code I ask my self how did you get the control ID?

Thanks for your help!!!!!

Link to comment
Share on other sites

Try sending F6 that should highlight url bar


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Thanks for your post the F6 allowed me to get control of the omnibox for URL and I can now change the address.

I would still like to learn how to use the control ID or atleast get the ID but for now I am good to go.

Happy 2013 and thanks!

With Autoit comes "Autoit Window info", Just put the crosshairs on the target control, click the tab 'Control' and see

You can acess by Scite in "Tools" or search in start menu (if win 7)

Really, now i see who control ID change, need other way

Edited by GordonFreeman
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...