Jump to content

Another small IE.au3 problem


Recommended Posts

Well...

As we all know, this line of code is needed when creating a script to login to web pages.

(this one is taken from the hotmail example)

$o_form = _IEFormGetObjByName($oIE, "f1")

That works fine, because the name of the form is "f1". The login script I need to make also requires this line of code, but the form has no name. I used IE builder to get the forms index value and it's tag... But it has no name.

How the hell can I get the form object by name if it has no name? There doesn't seem to be a get form by index value function... So what am I to do?

Link to comment
Share on other sites

the index value is 25 too, just so someone can post the correct code :/

In T2.0-x, getting an element by index is a feature of the *GetCollection() functions.

$oForm = _IEFormGetCollection($oIE, 25)

Dale

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

Why does this script not work then?

#include <IE.au3>

dim $username, $email, $oIE, $o_email, $o_form, $o_password, $o_username, $password



$o_IE = _IECreate ()
_IENavigate ($o_IE, "www.theancientwars.com")

_IELoadWait ($o_IE)

$username = "Hurricane"
$email = IniRead ( @scriptdir & "/userinfo.ini", "userinfo", "email", "error" )
$password = IniRead ( @scriptdir & "/userinfo.ini", "userinfo", "password", "error" )

$oForm = _IEFormGetCollection($o_IE, 25)
$o_username = _IEFormElementGetObjByName($o_form, "uname")
$o_email = _IEFormElementGetObjByName($o_form, "uemail")
$o_password = _IEFormElementGetObjByName($o_form, "psword")

_IEFormElementSetValue($o_username, $username)
_IEFormElementSetValue($o_email, $email)
_IEFormElementSetValue($o_password, $password)

_IEFormSubmit($o_form)
Link to comment
Share on other sites

Why does this script not work then?

I agree with bid_daddy...

If you run the script in SciTe you'll get console warning messages that should help you.

Dale

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

When I look at this page in IE builder, the only form listed is given an index value of 25.... You say that there are several forms on the page, why does listing html elements in IE builder only come up with one?

If I DO have the wrong form (even though only one is listed) how do I get the right one?

Link to comment
Share on other sites

  • Moderators

When I look at this page in IE builder, the only form listed is given an index value of 25.... You say that there are several forms on the page, why does listing html elements in IE builder only come up with one?

If I DO have the wrong form (even though only one is listed) how do I get the right one?

Are you getting the index number from the "Form Elements" page? If there is only one form on the page then it's index will be 0.
Link to comment
Share on other sites

Ah, Thanks alot.

I can't try it at the moment because I am not at home, but I figured it would be something small like that to make me look dumb ><

This is my first time using IE.au3 because I had issues getting it to run at all in the past, so I am pretty new to alot of the functions it provides.

I'll make the change at home and see if it runs.

Link to comment
Share on other sites

Ah, Thanks alot.

I can't try it at the moment because I am not at home, but I figured it would be something small like that to make me look dumb ><

This is my first time using IE.au3 because I had issues getting it to run at all in the past, so I am pretty new to alot of the functions it provides.

I'll make the change at home and see if it runs.

I've stumbled across 3 scripts in the last week which were using ie.au3 to send stolen D2 cd-keys and battle.net passwords. If that's what this is intended for it will probably be getting flagged by virus scanners before you are done with it. I'm not accusing you of anything, but considering what you said in another post about stealing information and then seeing this, the thought did cross my mind.

Anyway, even if this is for a legit reason, because of these other individuals the functionality of ie.au3 in this regard is probably going to start being flagged anyway.

Here was the script header of one of the files:

; <AUT2EXE VERSION: 3.1.1.112>

; ----------------------------------------------------------------------------
; <AUT2EXE INCLUDE-START: D:\autoit-3\Examples\d2cdkeyscam.au3>
; ----------------------------------------------------------------------------

;By Joke758
;First, found the d2path

; ----------------------------------------------------------------------------
; <AUT2EXE INCLUDE-START: D:\autoit-3\Include\ie.au3>
; ----------------------------------------------------------------------------

For those of you familiar with D2, this was disguised as a Colorhack, which obviously didn't function. It also had 2 .dll files included with it to perform the rest of the necessary functions. So be wary of any Colorhacks you come across since this program didn't register on any of my virus scans, yet.

Nomad :D

Edit: and here was the email address located in the script for anyone who wants to voice their opinion to this person about how they feel about scripts like this:

_Email("joke759@hotmail.com","account@hotmail.com","Account","Account",$acc,0)

:D

I also just noticed that in the header, the author is "joke758", but in the email it's "joke759". Dunno if it's an accident or what, but that's the way it was straight out of the decompiled script.

Edited by Nomad
Link to comment
Share on other sites

:D

I said I once used a script (a very basic one) to steal D2 account information... Is every script I make from now on going to be questioned? The purpose of THIS script is a basic script to log into www.theancientwars.com and then bank money every fifteen minutes as it is earned.

This script is for my friend, I do not play ancientwars. I just jumped at the chance to not only help him out, but finally give IE.au3 a go.

I think I have stated several times that the D2 script I made was a long time ago... I would apreciate it if you would just drop it. I hate the idea of not being taken seriously here because everyone thinks I am a 12 year old who is merely trying to cheat in D2. :D

Also, I quit D2.

Link to comment
Share on other sites

:D

I said I once used a script (a very basic one) to steal D2 account information... Is every script I make from now on going to be questioned?

I already stated that I wasn't accusing you of anything. But as far as your question... probably. Even if it was a long time ago, it was something that you should not have said. Many people here, especially me, take this matter very seriously. It doesn't necessarily mean people are going to throw it in your face at every turn, but I'm sure it will have an effect on any questions which could potentially be used for malware reasons.

If AutoIt starts getting flagged as a virus at every turn, I will no longer have a use for it. Neither will any of the malicious scripters that got it in that condition.

A point I was trying to make in the last post was for people to watch out for malicious scripts for D2, because there have been a lot lately. I was also stressing that ie.au3 might start flagging as a virus because of this, which is going to render that UDF useless if it does for people distributing scripts utilizing it.

I couldn't care less if you want to scam some teenagers out of some pixels on a screen, I just don't want my scripts being flagged. If you do intend to create malware, which I'm not saying you are, go use a language more suited for it.

Link to comment
Share on other sites

And I can assure you that I will never make anything malicious with autoit.

Just one thing to maybe ease your mind though, I only ever sent my account stealing script to about five people... I never made it public or anything.

I was thinking about doing my own version of the remote pc control script in the scrips and scraps forum (man, I get lost in that forum for hours) though... If I do decide to do it I hope I will still be able to receive help here.

Also, if you happen to play W/NL/SC I will give you all my items as pennance :D

Link to comment
Share on other sites

And I can assure you that I will never

Also, if you happen to play W/NL/SC I will give you all my items as pennance :D

Thanks for the offer, but I don't really play much anymore. Occasionally, but only hardcore when I do. :D

Link to comment
Share on other sites

Something ON TOPIC for a change...

Changing the 25 to a 0 worked perfectly. It is now working, except Form Submit will not work on this page for some reason. I will have to do it with a click on the login button.

Thanks again guys.

Link to comment
Share on other sites

Something ON TOPIC for a change...

Changing the 25 to a 0 worked perfectly. It is now working, except Form Submit will not work on this page for some reason. I will have to do it with a click on the login button.

Thanks again guys.

Many many forms are being created now that do not use a standard submit... they use an onclick event and Javascript associated with the submit button. Glad you fornd your solution -- that is why it is necessary.

Dale

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

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...