daslick Posted January 3, 2007 Posted January 3, 2007 #include <IE.au3> $oIE = _IECreate ("http://www.google.com") $oForm = _IEFormGetObjByName ($oIE, "f") $oQuery = _IEFormElementGetObjByName ($oForm, "q") _IEFormElementSetValue ($oQuery, "AutoIt IE.au3") _IEFormSubmit ($oForm) How can I change this script to use the I'm Feeling Lucky button instead? I looked in the google source code and I believe the button name is "btnI" THANKS!
crzftx Posted January 3, 2007 Posted January 3, 2007 (edited) That seems very reasonable...<br><input name=btnG type=submit value="Google Search"><input name=btnI type=submit value="I'm Feeling Lucky"></td>...Looks like it;s called 'btnI' to me tooEDIT:: never mind, I didn't get the Q, I thought you meant btnI didn't work... Edited January 3, 2007 by crzftx
daslick Posted January 3, 2007 Author Posted January 3, 2007 (edited) I haven't been able to get btn1 to work... is this how it should be? - it doesn't work.... what is the name of the button/ or is there another way to get the button's name? #include <IE.au3> $oIE = _IECreate ("http://www.google.com") $oForm = _IEFormGetObjByName ($oIE, "bnt1") $oQuery = _IEFormElementGetObjByName ($oForm, "q") _IEFormElementSetValue ($oQuery, "AutoIt IE.au3") _IEFormSubmit ($oForm) Edited January 3, 2007 by daslick
daslick Posted January 5, 2007 Author Posted January 5, 2007 This is all I have... $Googlepage = _IEFormGetObjByName ($IE, "f") $Googlepageinput = _IEFormElementGetObjByName ($Googlepage, "q") _IEFormElementSetValue ($Googlepageinput, '"' & $site & '"') _IEAction($Googlepageinput, "focus") Send("{TAB 2}") Send("{Enter}") This is a little better because it focuses on the input field first, but does anyone know how to get the element name of the ImFeelingLucky button?
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