Jump to content
Sign in to follow this  
DaleHohm

Internet Explorer Automation UDF library

Recommended Posts

LovinItAll

While _IEGetProperty($o_object, "busy")
    Sleep(100)
WEnd
I can try this, but I suspect that:

If IsObj($o_object) Then ;---in _IEGetProperty

will SetError(1) because $o_object is not yet recognized.

See what I mean? It won't be busy because it won't be anything, if that makes sense. At least that is what the error always says: "Object Does Not Exist"

Before I tried the mod I suggested, even a value like Sleep(1000) after _IECreate would fail periodically with some users. Like you, I cannot get the error on my machine (well, I got it once).

I assume by relying on a behavior of IE that could change, you are referencing the way IE displays the title.

I will try to get the snippet you suggested to users that might cooperate, but they are paying customers, and their tolerance for errors and willingness to test is limited.....go figure!

Lee

Share this post


Link to post
Share on other sites
DaleHohm

I can try this, but I suspect that:

Sorry, I could have done a better job of explaining... there is a significant difference between the two. _IELoadWait checks the readyState of the document loaded in the browser ($oIE.document), the _IEGetProperty($oIE, "busy") checks the state of the browser itself ($oIE) so it should not fail if the document is not yet instantiated, but should still be sensitive to the fact that the document is being loaded.

I assume by relying on a behavior of IE that could change, you are referencing the way IE displays the title.

Several concerns come to mind here 1) older or newer browser versions 2) branded browsers and 3) the real kicker, local language settings.

Several people have started working with me to resolve this, but all have bailed when they could no longer reproduce it or found a workable (for them) workaround. If I could reproduce this I could erradicate the problem in a few minutes -- the documentation of these properties their nuances just plain stinks.

I understand your paying customer situation and you have a reasonable solution for your environment. It is not a good general one however, so I'll continue to hope to find a reproducer.

After some testing, the busy property is not an end-all solution either. More brute force suggests this:

While _IEGetProperty($o_object, "busy") or _
    ((_IEGetProperty($o_object, "readyState") <> "complete") and (_IEGetProperty($o_object, "readyState") <> 4))
    Sleep(100)
WEnd
_IELoadWait($o_object)

Perhaps I'll try a high synthetic load on my system and see if I can reproduce...

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

Share this post


Link to post
Share on other sites
LovinItAll

While _IEGetProperty($o_object, "busy") or _
   ((_IEGetProperty($o_object, "readyState") <> "complete") and (_IEGetProperty($o_object, "readyState")<> 4))
   Sleep(100)
WEnd
_IELoadWait($o_object)
I like this, and have included it in IE.au3. As I have mentioned, _IECreate is not the only place my users have received the "Object Not Found" error. It will also manifest itself after _IENavigate or any function that relies on the page loading completely, and where I am retrieving objects on the page to which the user navigated. I'll try to narrow it down even more for you. I did have one user who was getting the error check for "ghost" windows immedialtely after receiving the error (I had her on the phone), but none existed. I tried to get her to accept a file with trace lines, but I was met with a lack of comprehension (probably my fault for trying to explain in the first place -- I should have just sent it), but she was pretty angry already, so I just fixed it with a delay.

Thanks again ~ Lee

P.S. I also throw this into IE.au3 for my own use. I'm sure there is a very good reason you do not wish to include it (keeping individual actions separate -- handy, though, if the user intends to navigate to a page after creating the window object), but I find it helpful (saves a line of code...what can I say?!)

Func _IECreateAndNav($s_URL = "About:Blank",$f_visible = 1)   
$o_object = ObjCreate("InternetExplorer.Application")
   If IsObj($o_object) Then
      $o_object.visible = $f_visible
      $o_object.navigate ($s_URL)
         While _IEGetProperty($o_object, "busy") or _
            ((_IEGetProperty($o_object, "readyState") <> "complete") and (_IEGetProperty($o_object, "readyState") <> 4))
            Sleep(100)
         WEnd
      _IELoadWait($o_object)
      SetError(0)
      Return $o_object
   Else
      SetError(1)
      Return 0
   EndIf
EndFunc  ;==>_IECreateAndNav

Share this post


Link to post
Share on other sites
LovinItAll

Dale,

Here is an example of aberrant behaviour: (may have nothing to do with IE.au3, but it may....)

#include <IE.au3>
$o_IEPreview = _IECreate ()
WinActivate("about:blank - Microsoft Internet Explorer")
WinSetOnTop("about:blank - Microsoft Internet Explorer", "", 1)
WinSetState("about:blank - Microsoft Internet Explorer", "", @SW_MAXIMIZE)
WinSetTitle("about:blank - Microsoft Internet Explorer", "", "Mail Preview - Microsoft Internet Explorer")

Running this through Tools->Beta Run, the window is always set on top and is always maximized

After Beta Compile, it's a hit-or-miss thing -- sometimes it Maximizes, sometimes not. Sometimes it is set On Top, other times not.

Just an FYI.....

Edited because I am tired!

Edited by LovinItAll

Share this post


Link to post
Share on other sites
DaleHohm

If it is happening on more than _IECreate(), then a test with a mod to both _IECreate and _IELoadWait is called for.

Please put this code into _IELoadWait() (prior to the code that checks the readystate of the document... you need both):

While _IEGetProperty($o_object, "busy") or _
   ((_IEGetProperty($o_object, "readyState") <> "complete") and (_IEGetProperty($o_object, "readyState")<> 4))
   Sleep(100)
WEnd

And this code into _IECreate() to replace what you changed there previously:

_IELoadWait($o_object)

My only trepidation about this is that I have not yet tested this on frames... you may want to do that before deploying or I'll have time to do so a bit later.

Yes, I understand the need for a Create and Nav -- it wasn't done originally simply because I didn't anticipate the way it would be used. I have a draft of this in the new UDF baselevel.

thanks,

Dale

Edit: hit submit too soon

Edited by DaleHohm

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
jungles

It seems I have to revert to non-COM techniques handle instances where modal windows arise inside the context of an object action (e.g. IE refresh of a POST page, deleting non-empty worksheets in Excel) Is there any way to force some behaviours - e.g some parameter one could pass to the IE refresh action. In my work-arounds I have used the crudest methods requiring visible windows - not what I need. Will sending to a control allow me to go invisible as I wish.

Just a potential tiny addition to the library that I needed:-[===============================================================================

;

; Function Name: _IEFormElementOptionGetValues()

; Description: Get values of Options within a Select drop-down form element

; Parameter(s): $o_object - Select Element object

; Requirement(s): AutoIt3 Beta with COM support (post 3.1.1)

; Return Value(s): On Success - Returns an array of option values

; On Failure - 0 and sets @ERROR = 1

; Author(s): Jim Francis adapted from Dale Holm

;

;===============================================================================

;

Func _IEFormElementOptionGetValues($o_object)

If IsObj($o_object.options) Then

SetError(0)

Dim $options[$o_object.options.length]

for $i = 0 to (UBound($options) - 1)

$options[$i] = $o_object.options($i).value

Next

Return $options

Else

SetError(1)

Return 0

EndIf

EndFunc ;==>_IEFormElementOptionGetValues];

Share this post


Link to post
Share on other sites
6momo6

Hey ive got a question how can i add a ieloadwait into (this) my script ??

HotKeySet("{ESC}", "Terminate")

#include <IE.au3>

$oIE = _IECreate()
_IENavigate($oIE, "http://www.momo.de")
 ;Wait for page to finish loading
MouseClick("left", 609, 14, 2)
sleep(1000)
MouseClick("left", 1149, 139)
Send("momo")
sleep(1000)
MouseClick("left", 1158, 159)
Send("momo")
sleep(3000)
MouseClick("left", 1191, 157) 
sleep(3000)
MouseClick("left", 41, 252) 
sleep(3000)
MouseClick("left", 241, 278)
sleep(3000)
MouseClick("left", 953, 259) 
sleep(3000)
MouseClick("left", 239, 436) 
sleep(3000)
MouseClick("left", 442, 347)
sleep(3000) 
MouseClick("left", 656, 425)
sleep(3000) 
Send("fffffff")
sleep(3000) 
MouseClick("left", 664, 660);SIGNATUR WEG
sleep(6000) 
MouseClick("left", 760, 680);KOPIE WEG
while 1
MouseClick("left", 511, 625)
While $oIE.busy
   Sleep(10)
;Wait for page to finish loading
WEnd
MouseClick("left", 11, 62)
wend
;Wait for page to finish loading


Func Terminate()
    Exit 0
EndFunc

thx for any help i get!

-momo

Share this post


Link to post
Share on other sites
DaleHohm

It seems I have to revert to non-COM techniques handle instances where modal windows arise inside the context of an object action (e.g. IE refresh of a POST page, deleting non-empty worksheets in Excel) Is there any way to force some behaviours - e.g some parameter one could pass to the IE refresh action. In my work-arounds I have used the crudest methods requiring visible windows - not what I need. Will sending to a control allow me to go invisible as I wish.

The issue is that the modal dialogs stall script execution waiting for user action. The same happens with inline Javascript code. You only option is to initiate some sort of seperate execution thread to manage the dialog. Using an AutoIt SEND command to a control will allow the browser to mange the dialog creating and wait for the response while your au3 script is free to continue. You could also do something to fork another au3 execution in a seperate process context...

Just a potential tiny addition to the library that I needed:-[===============================================================================

;

; Function Name: _IEFormElementOptionGetValues()

I see what you are needing and I'm glad this works for your needs, but I don't see enough general utility to add this to the library. You create an array for option values, but will others need option text? selected property? what about defaultSelected? We could create a milti-dimentional array to hold all of there, but an object collection already does a good job of serving as a virtual multi-dimentional array and you can use .item and element properties to get the information.

Assuming $oSelectElement is an object reference to an existing Form SELECT element, you can get a collection of the OPTION items with:

$oOptions = _IETagNameGetCollection( $oSelectElement, "option")

You can then reference, for example, the value of the 3rd item:

$value3 = $oOptions.item(2).value
similarly you can determine if the option is selected with:
If $oOptions.item(2).selected Then
You can iterate through the options with:
For $oOption in $oOptions
   ;;; do something like look at $oOption.text or $oOption.selected
Next

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

Share this post


Link to post
Share on other sites
DaleHohm

Hey ive got a question how can i add a ieloadwait into (this) my script ??

HotKeySet("{ESC}", "Terminate")

#include <IE.au3>

$oIE = _IECreate()
_IENavigate($oIE, "http://www.momo.de")
;Wait for page to finish loading
MouseClick("left", 609, 14, 2)
sleep(1000)
MouseClick("left", 1149, 139)
Send("momo")
sleep(1000)
MouseClick("left", 1158, 159)
Send("momo")
sleep(3000)
MouseClick("left", 1191, 157) 
sleep(3000)
MouseClick("left", 41, 252) 
sleep(3000)
MouseClick("left", 241, 278)
sleep(3000)
MouseClick("left", 953, 259) 
sleep(3000)
MouseClick("left", 239, 436) 
sleep(3000)
MouseClick("left", 442, 347)
sleep(3000) 
MouseClick("left", 656, 425)
sleep(3000) 
Send("fffffff")
sleep(3000) 
MouseClick("left", 664, 660);SIGNATUR WEG
sleep(6000) 
MouseClick("left", 760, 680);KOPIE WEG
while 1
MouseClick("left", 511, 625)
While $oIE.busy
   Sleep(10)
;Wait for page to finish loading
WEnd
MouseClick("left", 11, 62)
wend
;Wait for page to finish loading
Func Terminate()
    Exit 0
EndFunc

thx for any help i get!

-momo

@momo

Not really sure what you are trying to do, but you can put _IELoadWait($oIE) in place of your While $oIE.busy while loop (_IENavigate calls it automatically). If you have followup questions, please create a post in the V3 Support forum.

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

Share this post


Link to post
Share on other sites
6momo6

thx dale! ive got a problem, sometimes it happends to me, the site is not complete loading and the script just fall down on that trick and it gets crushed.thats why i asked for _IELoadWait. It is able to check it better if the page has been complete loaded ?? I dont know how to explain it exactly .. im from germany. thx for any help i get.

-momo

Share this post


Link to post
Share on other sites
DaleHohm

_IELoadWait() checks the .readyState property of the embedded document rather than the .busy property of the browser itself. Generally _IELoadWait is more reliable.

Dale

p.s. Again, if you have more questions, please open a post in the V3 Support Forum


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
WorknMan

Hey guys,

I'm brand new to AutoIt. I originally had trouble getting ie.au3 to work, but then downloaded the v3.1.1.111 beta, and now it seems to be working. However, I've got two issues:

1. If I don't have any instances of Internet Explorer running before calling the _IENavigate function, I often (but not always) get this error:

While ($o_object.document.readyState <> "complete") and ($o_object.document.readyState <> 4)

While ($o_object.document^ ERROR

Error: The requested action with this object has failed.

I've seen this error pop up when doing a search on the forum, but don't know if there's a fix for it. I've duplicated it on two different computers.

2. This is my most pressing problem .. I can't get the Submit button to work in the following:

#include <IE.au3>
$oIE = _IECreate()
_IENavigate($oIE, "http://www.worknman.com/login.html")
$o_form = _IEFormGetObjByName($oIE, "logonForm")
$o_login = _IEFormElementGetObjByName($o_form, "username")
$o_password = _IEFormElementGetObjByName($o_form, "password")
_IEFormElementSetValue($o_login, "test")
_IEFormElementSetValue($o_password, "test")
_IEFormSubmit($o_form)

The Submit button on the page in the code above doen't really do anything - it's just a reflection of a page on the corporate intranet that I can't link to. I've been able to get Submit to work on other pages, just not this one. I suppose I could just send an Enter keypress, but I need the above code to work when the computer is locked!

Anyway, I hope I can get this to work. Alongside Perl, this little tool just rocks :o

Share this post


Link to post
Share on other sites
DaleHohm

@WorknMan

Regarding your second item... the typical cause is Javascript tied to the form. Please look at the IE.au3 examples in reply 3 for an example of getting a reference to the submit button and then using .click

Regarding your first item, it is an issue that a handful of people have seen, but I have never been able to reproduce. I have finally been able to reproduce a variant of it with the following code:

While 1
    $oIE = _IECreate()
    _IENavigate($oIE, "about:blank")
    _IEQuit($oIE)
WEnd

I would really appreciate it if you would replace the following two functions in your copy of IE.au3, test and report back.

Func _IECreate($f_visible = 1)
; test version -- get rid of object timing error?
    $o_object = ObjCreate("InternetExplorer.Application")
    If IsObj($o_object) Then
        $o_object.visible = $f_visible
        _IENavigate ($o_object, "about:blank")
        SetError(0)
        Return $o_object
    Else
        SetError(1)
        Return 0
    EndIf
EndFunc ;==>_IECreate


Func _IELoadWait($o_object, $i_delay = 0)
; test version -- get rid of object timing error?
    If IsObj($o_object) Then
        Sleep($i_delay)
        If ObjName($o_object) = "IWebBrowser2" Then
            While _IEGetProperty($o_object, "busy") or _
                ((_IEGetProperty($o_object, "readyState") <> "complete") and _
                 (_IEGetProperty($o_object, "readyState") <> 4))
                Sleep(100)
            WEnd
        EndIf
        While ($o_object.document.readyState <> "complete") and _
            ($o_object.document.readyState <> 4)
            Sleep(100)
        WEnd
        SetError(0)
        Return 1
    Else
        SetError(1)
        Return 0
    EndIf
EndFunc ;==>_IELoadWait

thanks,

Dale

edit: typo

Edited by DaleHohm

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
WorknMan

Regarding your second item... the typical cause is Javascript tied to the form. Please look at the IE.au3 examples in reply 3 for an example of getting a reference to the submit button and then using .click

Yes, that works great. Thanks!

I would really appreciate it if you would replace the following two functions in your copy of IE.au3, test and report back.

I did test your code and ran the script about 10 times - the error did not pop up anymore, so this seems to have fixed the problem. Only thing is, I can only test it on 1 of the 2 computers I tried earlier, but I'm guessing it'll work fine one the other once I get a chance to try it :o So I guess I'll use this modified ie.au3 from now on - hoping this fix will get added in future version of the original.

Thanks again.

PS - The part about needing the beta to make ie.au3 work, you should put that in the beginning of the original post on this thread, in big, bold letters, just to make sure it catches the eye of people like me who don't pay close attention :geek: I originally missed it my first time through!

Share this post


Link to post
Share on other sites
AutoITPimp

Hey Dale,

Can you help me out with this? I can't seem to get the _IEFrameGetSrcByIndex() function to work properly. Is there anything you can see I am doing wrong? It works on a 0 based index correct?

I have an intranet site with 15 frames/iframes, and I need to scan through the source on them to find the frame I want to work with. I don't have the names of the frames, everything on the site is based by the "id" attribute. The site was built by a crappy company, and I cannot change the source so I am stuck working with it as is.

For $count = 0 to 14
    If StringInStr( _IEFrameGetSrcByIndex( $objIE, $count ), "BELVOIR" ) Then
        $HTML = _IEFrameGetSrcByIndex( $objIE, $count )
        ExitLoop
    EndIf
Next
Edited by AutoITPimp

Share this post


Link to post
Share on other sites
DaleHohm

Hey Dale,

Can you help me out with this? I can't seem to get the _IEFrameGetSrcByIndex() function to work properly. Is there anything you can see I am doing wrong? It works on a 0 based index correct?

I have an intranet site with 15 frames/iframes, and I need to scan through the source on them to find the frame I want to work with. I don't have the names of the frames, everything on the site is based by the "id" attribute. The site was built by a crappy company, and I cannot change the source so I am stuck working with it as is.

For $count = 0 to 14
    If StringInStr( _IEFrameGetSrcByIndex( $objIE, $count ), "BELVOIR" ) Then
        $HTML = _IEFrameGetSrcByIndex( $objIE, $count )
        ExitLoop
    EndIf
Next
Ya know, I'm betting you are expecting that function to do something that it doesn't do. It actually just returns the url of the source in the frame, not the HTML source. It is one of the functions that I would like to retire because it really doesn't add much value. It looks like what you really want to do is to use
_IEBodyReadHTML(_IEFrameGetObjByIndex($objIE, $count))

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

Share this post


Link to post
Share on other sites
Snarg

Edit: I think I posted this in the wrong thread. Sorry.

Edited by Snarg

A little reading goes a long way. Post count means nothing.

Share this post


Link to post
Share on other sites
AutoITPimp

Ya know, I'm betting you are expecting that function to do something that it doesn't do. It actually just returns the url of the source in the frame, not the HTML source. It is one of the functions that I would like to retire because it really doesn't add much value. It looks like what you really want to do is to use

_IEBodyReadHTML(_IEFrameGetObjByIndex($objIE, $count))

Dale

You're right, I'm looking for it to return the HTML source code. However, I'm not even getting it to return the URL. When I do the following, I just get a blank MsgBox.

MsgBox( 0, "Test", _IEFrameGetSrcByIndex( $objIE, 10 ) )

However, I will try your suggestion in the meantime/

/me hates using frames, and now hates scripting through frames.

Share this post


Link to post
Share on other sites
AutoITPimp

Tried your suggestion. It didn't work, probably due to the fact that it won't give me the actual URL for the frame.

Share this post


Link to post
Share on other sites
DaleHohm

Tried your suggestion. It didn't work, probably due to the fact that it won't give me the actual URL for the frame.

Probably best to start a new thread for this... post some sample code and HTML.

Are there really 11 or more frames in the pagge you are working with?

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

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×