Jump to content

Recommended Posts

Posted

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

Posted (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 too

EDIT:: never mind, I didn't get the Q, I thought you meant btnI didn't work...

Edited by crzftx
Posted (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 by daslick
Posted

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?

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...