Jump to content

IE.au3 help


 Share

Recommended Posts

I'm apologize if I am asking a question that has been asked before, but I just can't find it in the help file or on the forum here.

Where would be the best place to start trying learn about _IE?

A basic question I have for example is , where do I look on a webpage to get the info about the fields?

Example- If I wanted to write a script that logged me into a wepage how do I know what the Username and password fields are named?

Normaly, I would use the " Autoit Window info" tool but I don't know where to look on a webpage. Do you have to look in the source of the page?

Thank you in advance for any input

Autoit Rocks! :)

[size="2"][u]Beer is living proof that God loves us and wants us to be happy.-- Ben Franklin[/u][/size]

Link to comment
Share on other sites

DaleHohm recommends a few things that will help you out... first and formost I would suggest AutoIt IE builder , thats a really good program and where I started learning about the great world that is IE scriptng... other then that, honestly pretty much everything Dalhohm has in his sig is very relevant and a good place to start. DaleHohm. Try IE developer toolbar or debugbar, debugbar is what I use when scripting IE programs.

Also, I recommend searching around on here for an example of how to long into a website (yahoo or something similar). If you can't find one I wrote one for hotmail that should be around here somewhere....

If you take the time to examine the script and find the objects via debugbar, it will really help you understand where to start, and how things generally work.

EDIT: In case you don't know DaleHohm is the guy who wrote he autoit IE.au3 UDF...

Edited by someone
While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd
Link to comment
Share on other sites

DaleHohm recommends a few things that will help you out... first and formost I would suggest AutoIt IE builder , thats a really good program and where I started learning about the great world that is IE scriptng... other then that, honestly pretty much everything Dalhohm has in his sig is very relevant and a good place to start. DaleHohm. Try IE developer toolbar or debugbar, debugbar is what I use when scripting IE programs.

Also, I recommend searching around on here for an example of how to long into a website (yahoo or something similar). If you can't find one I wrote one for hotmail that should be around here somewhere....

If you take the time to examine the script and find the objects via debugbar, it will really help you understand where to start, and how things generally work.

EDIT: In case you don't know DaleHohm is the guy who wrote he autoit IE.au3 UDF...

Thank you! I will definetly check that out, I have already started looking at some snippets that they wrote here : http://quadryders.com/phpcc/snippet.php?sid=1

I just didn't understand where to start.

Thanks again for your fast reply!

[size="2"][u]Beer is living proof that God loves us and wants us to be happy.-- Ben Franklin[/u][/size]

Link to comment
Share on other sites

Thank you! I will definetly check that out, I have already started looking at some snippets that they wrote here : http://quadryders.com/phpcc/snippet.php?sid=1

I just didn't understand where to start.

Thanks again for your fast reply!

OK, I have had some time to start some basic web login scripts but I seem to have a trend on every page I try to login into.... I can never get it to set the value for the password field.

Here's an example, what am I doing wrong?

#include <IE.au3>

$mYusername = "Test"

$mYpassword = "Test"

$oIE = _IECreate ("https://commercial.wachovia.com/Online/Fina...action=wrsLogin")

$oform = _IEGetObjByName ($oIE, "Form4")

$ologin = _IEFormElementGetObjByName($oform, "Userid")

$opassword = _IEFormGetObjByName($oform, "Password")

_IEFormElementSetValue($ologin, $mYusername)

_IEFormElementSetValue($opassword, $mYpassword)

_IEFormSubmit($oform, "Login")

[size="2"][u]Beer is living proof that God loves us and wants us to be happy.-- Ben Franklin[/u][/size]

Link to comment
Share on other sites

What is idisplayed to the SciTe console?

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

What is idisplayed to the SciTe console?

Thank you for you reply DaleHohm, sorry for the delay in my reply.

Below is the Scite error that is displayed in Scite:

--> IE.au3 V2.3-1 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch

--> IE.au3 V2.3-1 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType

[size="2"][u]Beer is living proof that God loves us and wants us to be happy.-- Ben Franklin[/u][/size]

Link to comment
Share on other sites

It couldn't find Form4. I have very limited knowledge w/ _IE but I can see that much from the first warning.

http://www.debugbar.com/ Not sure if anyone's suggested this to you, but it's like the AutoIt window info tool for internet explorer :) It gives you tons of information about the site you're on. (Notice it's one of dalehohm's first links in his signature)

Link to comment
Share on other sites

OK, I have had some time to start some basic web login scripts but I seem to have a trend on every page I try to login into.... I can never get it to set the value for the password field.

Here's an example, what am I doing wrong?

#include <IE.au3>

$mYusername = "Test"

$mYpassword = "Test"

$oIE = _IECreate ("https://commercial.wachovia.com/Online/Fina...action=wrsLogin")

$oform = _IEGetObjByName ($oIE, "Form4")

$ologin = _IEFormElementGetObjByName($oform, "Userid")

$opassword = _IEFormGetObjByName($oform, "Password")

_IEFormElementSetValue($ologin, $mYusername)

_IEFormElementSetValue($opassword, $mYpassword)

_IEFormSubmit($oform, "Login")

You use _IEFormGetObjByName() to get the form object itself, not objects contained inside the form. Also, "Password" is a form element, not another form inside "Form4". Try it this way:
#include <IE.au3>

$mYusername = "Test"
$mYpassword = "Test"

$oIE = _IECreate("https://commercial.wachovia.com/Online/Fina...action=wrsLogin")

; Get a reference to the form by name
$oform = _IEFormGetObjByName($oIE, "Form4")

; Get references to form elements by name
$ologin = _IEFormElementGetObjByName($oform, "Userid")
$opassword = _IEFormElementGetObjByName($oform, "Password")

; Enter data
_IEFormElementSetValue($ologin, $mYusername)
_IEFormElementSetValue($opassword, $mYpassword)

; Submit form
_IEFormSubmit($oform, "Login")

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

You use _IEFormGetObjByName() to get the form object itself, not objects contained inside the form. Also, "Password" is a form element, not another form inside "Form4". Try it this way:

#include <IE.au3>

$mYusername = "Test"
$mYpassword = "Test"

$oIE = _IECreate("https://commercial.wachovia.com/Online/Fina...action=wrsLogin")

; Get a reference to the form by name
$oform = _IEFormGetObjByName($oIE, "Form4")

; Get references to form elements by name
$ologin = _IEFormElementGetObjByName($oform, "Userid")
$opassword = _IEFormElementGetObjByName($oform, "Password")

; Enter data
_IEFormElementSetValue($ologin, $mYusername)
_IEFormElementSetValue($opassword, $mYpassword)

; Submit form
_IEFormSubmit($oform, "Login")

:)

Ahh, I feel like a knuckle head now, Thank you PsaltyDS!! :)

[size="2"][u]Beer is living proof that God loves us and wants us to be happy.-- Ben Franklin[/u][/size]

Link to comment
Share on other sites

Sorry Nevin, I didn't see your post until now. I have been using the debugbar, but I know I'm not using it to it's full efficiency. :)

[size="2"][u]Beer is living proof that God loves us and wants us to be happy.-- Ben Franklin[/u][/size]

Link to comment
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
 Share

  • Recently Browsing   0 members

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