Sign in to follow this  
Followers 0
Home Bunny

Howto Process WebPage text and buttons

3 posts in this topic

#1 ·  Posted (edited)

Hi all,

I want for example open IE, go to google, fill in some text and click the search button.

I used google only as an example, is there someone who as an example script how to do this?

thx,

Edited by Home Bunny

Share this post


Link to post
Share on other sites



Hi all,

I want for example open IE, go to google, fill in some text and click the search button.

I used google only as an example, is there someone who as an example script how to do this?

thx,

Straight from the latest beta help file

#include <IE.au3>
$oIE = _IECreate ("http://www.google.com")
$oForm = _IEFormGetObjByName ($oIE, "f")
$oQuery = _IEFormElementGetObjByName ($oForm, "q")
_IEFormElementSetValue ($oQuery, "AutoIt IE.au3")
_IEFormSubmit ($oForm)

Lookup _IEFormSubmit



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

Thx BigDod,

I was missing the latest beta, therefor i couldn't found examples in the helpfile :">

However my script is finished now, a sms sending script, for the Belgium proximus users:

#include <IE.au3>

;*// Grap Commandline arguments
if $CmdLine[0] = 4 then
    $ProximusUID = $CmdLine[1] 
    $ProximusPWD = $CmdLine[2]
    $SendTo = $CmdLine[3]
    $SendMessage = $CmdLine[4]
Else
    Msgbox (16 , "Error" , "Incorrect Commandline arguments founded : " & $CmdLineRaw , 20)
    Exit 
EndIf

;*// Goto Proximus SMS Page
$ProximusPage = "http://smsonline.proximus.be/smsonline/sms/compose?laf=customer&lan=nl"
$oIE = _IECreate ($ProximusPage)

;*// Select SMS Form
$oForm = _IEFormGetObjByName ($oIE, "myform")
;*// Send To
$oSuffix = _IEFormElementGetObjByName ($oForm, "suffix")
_IEFormElementSetValue ($oSuffix, $SendTo)
;*// SMS Message
$oContent= _IEFormElementGetObjByName ($oForm, "smsmessage")
_IEFormElementSetValue ($oContent, $SendMessage)

;*// Hit Link 'Send SMS'
_IELinkClickByText ($oIE, "Bericht verzenden")

;*// Select Security Form
$oForm = _IEFormGetObjByName ($oIE, "frmLogin")
;*// User ID
$oUID = _IEFormElementGetObjByName ($oForm, "msisdn")
_IEFormElementSetValue ($oUID, $ProximusUID)
;*// Password
$oPWD = _IEFormElementGetObjByName ($oForm, "password")
_IEFormElementSetValue ($oPWD, $ProximusPWD)

_IEImgClick ($oIE, "btn_go.gif", "src")

;*// Give the page time to complete and close
Sleep(5000);Sleep for 5 seconds
_IEQuit ($oIE)

Greetz,

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
Sign in to follow this  
Followers 0