Sign in to follow this  
Followers 0
lostbit59

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

7 posts in this topic

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!!!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

$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

Share this post


Link to post
Share on other sites

Thanks I hope to try this tomorrow.

Share this post


Link to post
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!!!!!

Share this post


Link to post
Share on other sites

Try sending F6 that should highlight url bar



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0