Jump to content

_IECreateEmbedded help!


giankz
 Share

Recommended Posts

I created a browser with "_IECreateEmbedded", but I want to login automatically using "_IEGetObjByName"

eg.

CODE
$ie = _IECreateEmbedded()

GUICtrlCreateObj($ie, -12, -25, 470, 420)

$oIE = _IENavigate($ie, "http://www.webpage.com/login")

GUISetState()

$oForm = _IEGetObjByName ($oIE, "UserName")

$oForm1 = _IEGetObjByName ($oIE, "Password")

$oForm2 = _IEGetObjByName($oIE,"Login_Button")

$oForm.value = "1234"

$oForm1.value= "password"

$oForm2.value= Send("{ENTER}")

the error is:

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

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

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

E:\Users\Giankz\Documents\@rturito v0.1.2.au3 (444) : ==> Variable must be of type "Object".:

can someone help me?

Othe thing I created a "form" using "GUICreate" in this "form" I put the user and password anda two buttons "login" and"cancel" I want to close the "form" "GUICreate" when one of the buttons are pressed and open again when needed. The "form" is within a "menu" like > "File/open/from web", "from web" is the "form" that I want to open and close as many times as I want, my problem is when I press cancel o login button the "form"don't close and if I put "GUIdelete()" or hide the "form" does not reappear.

Link to comment
Share on other sites

You're mixing up $ie and $oIE

_IENavigate does not return an object, _IECreate does

instead of

$ie = _IECreateEmbedded()

GUICtrlCreateObj($ie, -12, -25, 470, 420)

$oIE = _IENavigate($ie, "http://www.webpage.com/login")

use

$oIE = _IECreateEmbedded()

GUICtrlCreateObj($oIE, -12, -25, 470, 420)

_IENavigate($oIE, "http://www.webpage.com/login")

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