Jump to content
Sign in to follow this  


Recommended Posts

I have been trying to get this to work for hours now but i must be missing something. I am reading the source from IE to get a version number. I can successfully read and then use _IEPropertySet to overwrite the onpage html, so i know im getting the script to read the source and sucessfully overwrite it. The problem is im trying to write some error checking statements to only run code if the version number is different than previously captured, but if i try to do a consolewrite or msgbox to display the read text the only response i get back is '0'

#include <IE.au3>
$versionName="my test version #"
$Page=_IEFormGetObjByName($oIE, "form1")
WinWait("My Site")
$versionNum = _IEGetObjById($Page, "lblVersion")
$versionGet = _IEPropertyGet($versionNum, "innertext")
MsgBox(1,"",_IEPropertyGet($versionNum, "innertext"))
_IEPropertySet($versionNum, "innertext", $versionName)

Ive tried every variation of ways that i can think to show the _IEPropertyGet($versionNum, "innertext") in console or msgbox but must be lacking something... I also keep getting errors in the console that im not sure what is causing them

--> IE.au3 V2.4-0 Error from function _IEGetObById, $_IEStatus_InvalidObjectType

--> IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidDataType

--> IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidDataType

Share this post

Link to post
Share on other sites

You'll get nowhere without understanding the casuse of the messages to the console. Start with he first one. It means that the parameter you passed to _IEGetObByID is an objet, but not the expected type of object. Go look at the documentation for that function and the type of object expected intaht frst parameter andsee if itmakes sense to you now.


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

Share this post

Link to post
Share on other sites

Ive read through the helpfile on all of these parameters but its seems like i may be not understanding something....the helpfile states nothing about what type of objects are expected or anything that i can see...

Returns an object variable by id or name.

#include <IE.au3>

_IEGetObjById ( ByRef $o_object, $s_Id)

Parameters $o_object Object variable of an InternetExplorer.Application, Window or Frame object $s_Id Specifies id or name of the object you wish to match

Return Value Success: Returns an object variable pointing to the specified Object Failure: Returns 0 and sets @ERROR @Error: 0 ($_IEStatus_Success) = No Error 3 ($_IEStatus_InvalidDataType) = Invalid Data Type 7 ($_IEStatus_NoMatch) = No Match


This function will return an object reference to any object in the document with a specified id or name. DOM elements can have Name or ID attributes or both. A specific ID can be assigned to only a single element while a specific Name can be assigned to multiple elements. In Internet Explorer, the Name and ID namespaces are shared.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...