lostbit59 Posted December 29, 2012 Share Posted December 29, 2012 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 More sharing options...
GordonFreeman Posted December 29, 2012 Share Posted December 29, 2012 (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 December 30, 2012 by GordonFreeman Frabjous Installation Link to comment Share on other sites More sharing options...
lostbit59 Posted December 30, 2012 Author Share Posted December 30, 2012 Thanks I hope to try this tomorrow. Link to comment Share on other sites More sharing options...
lostbit59 Posted December 31, 2012 Author Share Posted December 31, 2012 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 More sharing options...
BigDod Posted December 31, 2012 Share Posted December 31, 2012 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 More sharing options...
lostbit59 Posted December 31, 2012 Author Share Posted December 31, 2012 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! Link to comment Share on other sites More sharing options...
GordonFreeman Posted December 31, 2012 Share Posted December 31, 2012 (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 seeYou 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 December 31, 2012 by GordonFreeman Frabjous Installation Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now