Jump to content

Login to my mail


Recommended Posts

is there a script that i can use to login to my mail in my GUI-Hosted internet explorer window , the one i did just work for internet explorer when not hosted in gui

CODE
$GUIActiveX = GUICtrlCreateObj ($oIE, 10, 31, $includedWidth, 360)

$oIEL=_IENavigate ($oIE, "HTTP://WWW.HOTMAIL.COM", 0)

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

$o_login = _IEFormElementGetObjByName ($o_form, "login")

$o_password = _IEFormElementGetObjByName ($o_form, "passwd")

$o_signin = _IEFormElementGetObjByName ($o_form, "SI")

$username = "Kohafa2000@msn.com"

$password = "Password***"

_IEFormElementSetValue ($o_login, $username)

_IEFormElementSetValue ($o_password, $password)

_IEAction ($o_signin, "click")

and it's not working i hope some one would fix it only
Link to comment
Share on other sites

is there a script that i can use to login to my mail in my GUI-Hosted internet explorer window , the one i did just work for internet explorer when not hosted in gui

CODE
$GUIActiveX = GUICtrlCreateObj ($oIE, 10, 31, $includedWidth, 360)

$oIEL=_IENavigate ($oIE, "HTTP://WWW.HOTMAIL.COM", 0)

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

$o_login = _IEFormElementGetObjByName ($o_form, "login")

$o_password = _IEFormElementGetObjByName ($o_form, "passwd")

$o_signin = _IEFormElementGetObjByName ($o_form, "SI")

$username = "Kohafa2000@msn.com"

$password = "Password***"

_IEFormElementSetValue ($o_login, $username)

_IEFormElementSetValue ($o_password, $password)

_IEAction ($o_signin, "click")

and it's not working i hope some one would fix it only
Opt("WinTitleMatchMode", 2)
Dim $win = "hotmail"
Dim $url = "homail.com"
Run("C:\Program Files\Internet Explorer\iexplore.exe" & " " & $url)
Sleep(7000)
WinActivate($win)
Send("username")
Send("{TAB}")
Send("password")
Send("{ENTER}")

Untested but you should be able to tweek the tabs to start in the correct spot. May need to FileDelete any *hotmai* cookies ot have it clear the username input.

Link to comment
Share on other sites

hey man i didnot want that one i guess i'm familiar with what i said i'm using embedded internet explorer object in my GUI and what u said isn't related to that and in embedde d objects u cannot use the send command

Link to comment
Share on other sites

If you run your script from SciTe, IE.au3 will likely give you some useful output to the console to help you debug.

Give it a try if you haven't already.

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

thanks dale but i did already and nothing in the console is shown just the output in the gui showing the login page without anything writtin in this form

Link to comment
Share on other sites

So you ran it with either F5 or Tools -> Go? Nothing was written to the console? or nothing that you consider to be related?

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

completely nothing in the console "please note that this script is a part of larger one with animated gui controls that i'll post later" thus when it's ran it just open the explorer control with noting except for the login form of hotmail where it was navigated as if i didnot post the login script thus try to stick to the script and correct it if u can so much depends on it "try to make a part of gui embedded internet explorer object and see for you self and thanks for ur interest in show help

Link to comment
Share on other sites

On the surface your script looks fine. That is why I asked for the console output. You should minimally get some thing like this:

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\My Documents\My Code\xxx.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams 
+>16:46:45 Starting AutoIt3Wrapper v.1.9.0
>Running AU3Check (1.54.7.0)  from:C:\Program Files\AutoIt3
+>16:46:45 AU3Check ended.rc:0
>Running:(3.2.4.7):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\My Documents\My Code\xxx.au3"    
+>16:46:51 AutoIT3.exe ended.rc:0
+>16:46:52 AutoIt3Wrapper Finished
>Exit code: 0   Time: 7.252

If there is no output to the console, you are doing something wrong. I went to a lot of work to make IE.au3 write these diagnostic messages just for this purpose. Please try to get the console output it will tell you what is wrong.

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

here you go >"d:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\Family\Desktop\Codes\au32.au3" /autoit3dir "d:\Program Files\AutoIt3" /UserParams

+>09:59:01 Starting AutoIt3Wrapper v.1.7.7

>Running AU3Check (1.54.6.0) from:d:\Program Files\AutoIt3

+>09:59:02 AU3Check ended.rc:0

>Running:(3.2.2.0):):\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\Family\Desktop\Codes\au32.au3"

--> IE.au3 Error from function _IEFormGetObjByName, $_IEStatus_InvalidDataType

--> IE.au3 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType

--> IE.au3 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType

--> IE.au3 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType

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

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

--> IE.au3 Error from function _IEAction, $_IEStatus_InvalidDataType

+>09:59:17 AutoIT3.exe ended.rc:0

+>09:59:19 AutoIt3Wrapper Finished

>Exit code: 0 Time: 18.168

Link to comment
Share on other sites

Oh, duh... seeing the diagnostics it is obvious what the code error is.

Look at the first one:

--> IE.au3 Error from function _IEFormGetObjByName, $_IEStatus_InvalidDataType

It tells you that you passed an invalid data type to _IEFormGetObjByName. You'll see that you pass the return value from _IENavigate to the function. Take a look at the docs -- _IENavigate does not return an object.

This code:

$oIEL=_IENavigate ($oIE, "HTTP://WWW.HOTMAIL.COM", 0)           
$o_form = _IEFormGetObjByName ($oIEL, "f1")oÝ÷ Ù(hºW[y«­¢+Ù}%9Ù¥Ñ ÀÌØí½%°ÅÕ½Ðí!QQ@è¼½]]¹!=Q5%0¹
=4ÅÕ½Ðì°À¤$$$(ÀÌØí½}½É´ô}%½ÉµÑ=©  å9µ ÀÌØí½%°ÅÕ½ÐíÄÅÕ½Ðì¤

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

now it gives an error in another completely diffrerent line d:\PROGRA~1\AutoIt3\Include\IE.au3 (1095) : ==> Error in expression.:

$o_col = $o_object.document.forms.item ($s_Name)

$o_col = ^ ERROR

+>04:14:00 AutoIT3.exe ended.rc:0

+>04:14:01 AutoIt3Wrapper Finished

>Exit code: 0 Time: 6.374 in this peace of code

;----- Determine valid collection length

Local $o_col, $i_length = 0

$o_col = $o_object.document.forms.item ($s_Name)

If IsObj($o_col) Then

If __IEIsObjType($o_col, "elementcollection") Then

$i_length = $o_col.length

Else

$i_length = 1

EndIf

EndIf

Link to comment
Share on other sites

First, what version of AutoIt and IE.au3 are you using? That does not match the line numbers for the current release.

_IE_VersionInfo() will give you the IE.au3 version. ConsoleWrite(@AutoItVersion & @CR) will give you the AutoIt version.

You'll need to try to figure out what line of your code leads to this, but I'll suggest that the most likely cause for errors like this is that the webpage has changed or is in the process of changing in the middle of your processing. Calls to _IELoadWait($oIE) can prevent this.

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

thanks man the ienavigatewait stuff worked thanks but my mail doesn't accept my password i guess it's upto security stuff thanks anyway hope u take a look at my previous port regarding embedded windows controls

Link to comment
Share on other sites

The only type of form field that has security that prevents setting value with script is INPUT TYPE=FILE

If you are having trouble with a password field, it is not due to any security issues.

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

Well . . . . .when i enter the password manually with the same username entered by autoit script ieverthing goes right but when i let autoit send the password and the click event it goes wrong. . .!

Link to comment
Share on other sites

it goes wrong

You're never going to get much help around here with descriptions like that...

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

but when i enter the password manually it goes fine with the username entered by the script but when i let the script do that it says wrong password

Link to comment
Share on other sites

Can't think of any reason that would happen. Some suggestions would be to have it pause before the click and insure that the password field is really getting filled (do '*'s appear?) -- if not, you need to check the form field name. If it is, use the mouse to click and see if something could be different... it is possible, but unlikely, that there is javascript tied to an onfocus event in addition to the click event.

Many people use these routines on username/password fields -- even hotmail -- with no troubles.

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