Guest Posted January 4, 2016 Posted January 4, 2016 Hey!How do I make this work? Mouse must click google's search bar$IE = ObjCreate("InternetExplorer.Application") $IE.visible = True $IE.navigate("google.com") while($IE.busy) WEnd sleep(2000) $inputs = $IE.document.getElementsByTagName("input") for $input in $inputs if $input.getAttribute("name") = "btnK" then $rightinput = $input EndIf Next $rightinput.click() ExitThanks alot!
jdelaney Posted January 4, 2016 Posted January 4, 2016 (edited) #include <IE.au3> $oIE = _IECreate("google.com",1) $oInputs = _IETagNameGetCollection($oIE,"input") For $oInput In $oInputs If $oInput.Name = "btnk" Then _IEAction($oInput,"focus") _IEAction($oInput,"click") ConsoleWrite("clicked!" & @CRLF) ExitLoop EndIf NextThis script doesn't actually 'do' anything, since there is no search criteria populated...you can tell it's clicking the proper button due to the focus though. Edited January 4, 2016 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
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