Jump to content
dadalt95

A simple google search

Recommended Posts

dadalt95

Perform a simple google search!

The script below works fine until fill the google form!

What I can't find is how to submit the form, tried a couple of ways and none of them worked.


 

#include <IE.au3>
$oIE = _IECreate ("www.google.com")
$o_form = _IEFormGetObjByName ($oIE, "f")

$o_login = _IEFormElementGetObjByName ($o_form, "q")
$username = "80251369"
_IEFormElementSetValue ($o_login, $username)

$o_numer = _IEGetObjByName($o_form, "btnK")

_IEAction ($o_numer, "click")

 

The code runs without any problem.

I don't know how to proceed!

Thanks in advance!

Share this post


Link to post
Share on other sites
dadalt95
3 minutes ago, Danp2 said:

Have you tried _IEFormSubmit instead of _IEAction?

Jessusss, you are so damn good!

Thanks danp2!

I owe you!

 

Share this post


Link to post
Share on other sites
jdelaney

You can also blur out of the search input field to perform the search.


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.

Share this post


Link to post
Share on other sites
dadalt95
12 minutes ago, jdelaney said:

You can also blur out of the search input field to perform the search.

_IEAction ($o_numer, "blur")

 

This didn't work!

I don't know why!

Share this post


Link to post
Share on other sites
dadalt95
1 minute ago, Danp2 said:

@dadalt95 That's the button, not the input field. :-)

I tried:

_IEAction ($o_numer, "blur")

_IEAction ($o_form, "blur")

_IEAction ($oIE, "blur")

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

  • Similar Content

    • XinYoung
      By XinYoung
      Quick question: How can I click this "Select All" button in IE? There's no ID, and the href is "#"  
      Am I looking at the wrong html code?
      Am I looking
      Thank you all in advance!
    • XinYoung
      By XinYoung
      Hello again 
      I need to click this Submit button, but it's in a lightbox and has no ID (i think) and I can't figure out a way to target it. _IEFormSubmit doesn't work.

       
      Thank you
    • lenclstr746
      By lenclstr746
      <span class="fr66n"><button class="dCJp8 afkep coreSpriteHeartOpen _0mzm-"><span class="glyphsSpriteHeart__outline__24__grey_9 u-__7" aria-label="Beğen"></span></button></span>
      I want to click this button ?
    • nooneclose
      By nooneclose
      Hello again, I am in phase two of my help bot. I cannot figure out how to properly code Autoit to click on a webpage button using the I.E UDF. I want to click on the button that I have attached as an image. This button does not have a name but it has an ID. Here is the HTML code for this button that I found using chromes developer inspector.
      HTML Code: 
      <img role="button" tabindex="-1" id="toolactions_INSERT-tbb_image" src="nav_icon_insertkey.gif" alt="New Work Order CTRL+ALT+I" draggable="false"> Here is the code that I have so far:
      ;******************************************************************************* ; Opens IE and fill out a New Workorder ;******************************************************************************* ; Start IE at the ** Tracking Application in ****** $oIE = _IECreate("https:I_am_Bound_by_my_company_to_not_reveal_this_webpage") ; Wait for a browser page load to complete _IELoadWait($oIE) Sleep(6000) ; Store the field names where the important data will be sent Local $nWorkOrderB = _IEGetObjById($oIE, "toolactions_INSERT-tbb_image") _IEAction($nWorkOrderB, "click")  I want my program to click on the button that looks like a piece of paper with a blue # 
      (For those wondering, I am allowed to send images just not the URL.) 
      As always any help would be appreciated. 

    • nooneclose
      By nooneclose
      My program has to first search for names in Column D that do not match up with column C. I got that search to work using arrays. It was slow and I could not figure out how to delete them so I just manually put coded the names that do not belong. I found their cell location but I do not know how to store that location and delete it.
      This is what I have so far.
      Local $NameToDelete1[6]  = _Excel_RangeFind($OpenWorkbook, "Smith, Bill") _ArrayDisplay($NameToDelete1, "Excel UDF: _Excel_RangeFind Example 1", "", 0, "|", "Sheet|Name|Cell|Value|Formula|Comment") _Excel_RangeDelete($OpenWorkbook.ActiveSheet, $NameToDelete1[2], $xlShiftUp)  
      Please help, I wanted to have this program done yesterday but I did not see this problem until yesterday. 
×