Sign in to follow this  
Followers 0
Ruriko

My first script isn't work

25 posts in this topic

#1 ·  Posted (edited)

Hi this is my first script. What I'm trying to do is

1. Open IE and login to gmail

2. click on the link "3Bratsmail"

3. click the first email

4. click on the specific link that contains "http://3BRATSMAIL.com/reademail.php?"

5. click on a random keyword (the http://3BRATSMAIL.com/reademail.php? site shows a bunch of keywords to click on)

But so far part 4 didn't work it did not click on the blue hyper link "http://3BRATSMAIL.com/reademail.php?"

#include <IE.au3>
Global $vLink = 1
$oIE = _IECreate("www.gmail.com")
_IELoadWait($oIE)
$oForm = _IEFormGetObjByName($oIE,"gaia_loginform")
$oEmail = _IEFormElementGetObjByName($oForm,"Email")
$oPass = _IEFormElementGetObjByName($oForm,"Passwd")
_IEFormElementSetValue($oEmail,"Username")
_IEFormElementSetValue($oPass,"Password")
_IEFormSubmit($oForm,0)
Sleep(100)
_IENavigate($oIE,"http://mail.google.com/mail/?ui=html&zy=f")
_IELoadWait($oIE)
_IELinkClickByText ($oIE, "3Bratsmail")
_IELinkClickByText ($oIE, "http://3BRATSMAIL.com/reademail.php?id=400&mailcode=232")
Edited by Ruriko

Share this post


Link to post
Share on other sites



First of all you only need to include IE.au3 once, so take the second one out.

As for the second command not working, did you toggle Beta? Or did you hit Alt-F5 to Beta Run it?


Infinity is a floorless room without walls or ceiling.Anyone who cannot cope with mathematics is not fully human. At best he is a tolerable subhuman who has learned to wear shoes, bathe, and not make messes in the house.

Share this post


Link to post
Share on other sites

What is toggle beta? all i did was run the script by double clicking it and a error comes up

Line 14(File "C:\documents and Settings\Susan\Desktop\PTR.au3"):

_IEClickLinkByText($oIE, "3Bratsmail")

_IEClickLinkByText(^Error

Error: Variable used without being declared.

Share this post


Link to post
Share on other sites

Well it is just what it says, you used the variable without identifying it as something.

I suggest using

$oIE=_IECreate("Link of the mailbox here.")

then you can use $oIE in your other commands.


Infinity is a floorless room without walls or ceiling.Anyone who cannot cope with mathematics is not fully human. At best he is a tolerable subhuman who has learned to wear shoes, bathe, and not make messes in the house.

Share this post


Link to post
Share on other sites

I added that but now I get a different error

IEClickLinkByText($oIE, "3Bratsmail")

^ERROR

Error: Unknown function name.

Share this post


Link to post
Share on other sites

Ummm did you accidentally delete the underscore before IE??

Should be: _IEClickLinkByText()


Infinity is a floorless room without walls or ceiling.Anyone who cannot cope with mathematics is not fully human. At best he is a tolerable subhuman who has learned to wear shoes, bathe, and not make messes in the house.

Share this post


Link to post
Share on other sites

No I didn't. Here's my updated script

WinActivate ("Gmail - Inbox (37) - Microsoft Internet Explorer")
#include <IE.au3> 
$oIE=_IECreate("http://mail.google.com/mail/?auth=DQAAAHIAAADspr21eVi1N4aUsxbfULMLSKHmM8MYdAIjCdAGse1VZhfstOwAD5bvKwIkHUDPfYDt8_LW19KVY7WrJG1JVUESLEOEDK-DtuXns0lpwIb8nsjFY_4IBDrQW53Jx7Biv_rKuEOZMUqP17AZDcv6tzSmzcrh6tQGwDCcmh3Vs9DLCQ")
_IEClickLinkByText ($oIE, "3Bratsmail")
Sleep (3000)
MouseClick ("left", 269, 326)
Sleep (3000)
_IEClickLinkByText ($oIE, "http://3BRATSMAIL.com/reademail.php?")
Sleep (3000)
_IEClickLinkByIndex ($oIE, 10)

Share this post


Link to post
Share on other sites

First of all, take out the first line, you don't need to activate a window and then start another one.

And I forgot, on the new version of IE.au3, they changed the ClickLinkByText and Index to _IELinkClickByText and Index so switch the functions and it should work.


Infinity is a floorless room without walls or ceiling.Anyone who cannot cope with mathematics is not fully human. At best he is a tolerable subhuman who has learned to wear shoes, bathe, and not make messes in the house.

Share this post


Link to post
Share on other sites

ok no more errors but it didn't click on the "3Bratsmail" label

#include <IE.au3> 
$oIE=_IECreate("http://mail.google.com/mail/?auth=DQAAAHIAAADspr21eVi1N4aUsxbfULMLSKHmM8MYdAIjCdAGse1VZhfstOwAD5bvKwIkHUDPfYDt8_LW19KVY7WrJG1JVUESLEOEDK-DtuXns0lpwIb8nsjFY_4IBDrQW53Jx7Biv_rKuEOZMUqP17AZDcv6tzSmzcrh6tQGwDCcmh3Vs9DLCQ")
Sleep (5000)
_IELinkClickByText ($oIE, "3Bratsmail")
Sleep (3000)
MouseClick ("left", 269, 326)
Sleep (3000)
_IELinkClickByText ($oIE, "http://3BRATSMAIL.com/reademail.php?")
Sleep (3000)
_IELinkClickByIndex ($oIE, 10)

Share this post


Link to post
Share on other sites

Well if its like part of a Javascript, and its a button, then its not technically a link, or you might just have the text wrong.

Another thing, the sleeps between each action is unnecessary because the IE functions automatically wait until the page loads completely before continuing.


Infinity is a floorless room without walls or ceiling.Anyone who cannot cope with mathematics is not fully human. At best he is a tolerable subhuman who has learned to wear shoes, bathe, and not make messes in the house.

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

here this will go to gmail, login, and convert it to html so you can use _IELinkClickByText

#include <IE.au3>
$oIE = _IECreate("www.gmail.com")
_IELoadWait($oIE)
$oForm = _IEFormGetObjByName($oIE,"gaia_loginform")
$oEmail = _IEFormElementGetObjByName($oForm,"Email")
$oPass = _IEFormElementGetObjByName($oForm,"Passwd")
_IEFormElementSetValue($oEmail,"Username")
_IEFormElementSetValue($oPass,"Password")
_IEFormSubmit($oForm)
_IENavigate($oIE,"http://mail.google.com/mail/?ui=html&zy=f")

EDIT: Small problem with multiple redirects on googles, side just a moment while i fix that

Edited by Thatsgreat2345

Share this post


Link to post
Share on other sites

You guys!! even read that website 3brats wont pay you they've tried this with other sites that have shutdown...

Share this post


Link to post
Share on other sites

Seagul I'm using it as a example before I try it on other sites.

Thatsgreat2345 your code works but it didn't click on the blue hyperlink that contains "http://3BRATSMAIL.com/reademail.php?".

#include <IE.au3>
$oIE = _IECreate("www.gmail.com")
_IELoadWait($oIE)
$oForm = _IEFormGetObjByName($oIE,"gaia_loginform")
$oEmail = _IEFormElementGetObjByName($oForm,"Email")
$oPass = _IEFormElementGetObjByName($oForm,"Passwd")
_IEFormElementSetValue($oEmail,"Username")
_IEFormElementSetValue($oPass,"Password")
_IEFormSubmit($oForm)
_IENavigate($oIE,"http://mail.google.com/mail/?ui=html&zy=f")
_IELinkClickByText ($oIE, "3Bratsmail")
MouseClick ("left", 513, 265)
_IELinkClickByText ($oIE, "http://3BRATSMAIL.com/reademail.php?")
_IELinkClickByIndex ($oIE, 10)

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

alright the times that i hate to use sleep this is a must due to IELoadWait being stupid and URL Checking is being retarted as well dont ask me why.

#include <IE.au3>
Global $vLink = 1
$oIE = _IECreate("www.gmail.com")
_IELoadWait($oIE)
$oForm = _IEFormGetObjByName($oIE,"gaia_loginform")
$oEmail = _IEFormElementGetObjByName($oForm,"Email")
$oPass = _IEFormElementGetObjByName($oForm,"Passwd")
_IEFormElementSetValue($oEmail,"Username")
_IEFormElementSetValue($oPass,"Password")
_IEFormSubmit($oForm,0)
Sleep(100)
_IENavigate($oIE,"http://mail.google.com/mail/?ui=html&zy=f")
_IELoadWait($oIE)
_IELinkClickByText ($oIE, "3Bratsmail")
Edited by Thatsgreat2345

Share this post


Link to post
Share on other sites

That code works. It did click on the "3Bratsmail" but it didn't click on the "http://3BRATSMAIL.com/reademail.php?" which is in a blue hyperlink

Share this post


Link to post
Share on other sites

That code works. It did click on the "3Bratsmail" but it didn't click on the "http://3BRATSMAIL.com/reademail.php?" which is in a blue hyperlink

yes it is magical you see that I can't exactly see your screen from where I'm sitting , and you know I'm not your slave, and with just a Quick look at the code to much surprise you may see that WOW i didn't add in that _IELinkClickByText now what can we conclude, yes that you actually have to do something by yourself it's really a marvelous concept.

Share this post


Link to post
Share on other sites

No I mean I have added that to my code but It still doesn't work

#include <IE.au3>
Global $vLink = 1
$oIE = _IECreate("www.gmail.com")
_IELoadWait($oIE)
$oForm = _IEFormGetObjByName($oIE,"gaia_loginform")
$oEmail = _IEFormElementGetObjByName($oForm,"Email")
$oPass = _IEFormElementGetObjByName($oForm,"Passwd")
_IEFormElementSetValue($oEmail,"Username")
_IEFormElementSetValue($oPass,"Password")
_IEFormSubmit($oForm,0)
Sleep(100)
_IENavigate($oIE,"http://mail.google.com/mail/?ui=html&zy=f")
_IELoadWait($oIE)
_IELinkClickByText ($oIE, "3Bratsmail")
 MouseClick ("left", 513, 265)
_IELinkClickByText ($oIE, "http://3BRATSMAIL.com/reademail.php?")
_IELinkClickByIndex ($oIE, 10)

Share this post


Link to post
Share on other sites

What is the MouseClick for, and if you supplied a screenshot that would be great.

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