Jump to content

Invoking IE.au3 functions inside JavaScript


Recommended Posts

I have an HTML page, which embeds a reference to AutoIt using the <OBJECT> tag. And I am using Javascript to make calls to AutoIt.

<object classid=clsid:1A671297-FA74-4422-80FA-6C5D8CE4DE04
    id=AutoItXDLL VIEWASTEXT>
</object>

I would like to use IE.au3 functions in the Javascript so that I can create a new browser window, submit information, etc, starting from an HTML page. What is the code to import IE.au3 functions, so that this kind of statement can work?

function createIEBrowser() {
    var oIE = AutoItXDLL._IECreate();
}

I tried AutoItXDLL.#include <IE.au3> but with no luck. I am unsure as to whether that is the correct syntax, or whether I need to include IE.au3 somewhere on the system. Can anyone help me?

Thanks in advance.

Link to comment
Share on other sites

Unfortunately there is no way to do this.

Suggest you do a search of the forums for AutoItX and UDF rather than rehashing this subject again here.

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

Unfortunately there is no way to do this.

Suggest you do a search of the forums for AutoItX and UDF rather than rehashing this subject again here.

Dale

Oh no, that's pretty disappointing as the IE functions are much better than using the standard functions when trying to automate actions in a browser. Oh well.... :P

Link to comment
Share on other sites

Oh no, that's pretty disappointing as the IE functions are much better than using the standard functions when trying to automate actions in a browser. Oh well.... :P

I should probably give a reason why I said the above. One of the pages I am trying to script against has quite a lot of links, and IE functions allow me to specify exactly which link should be clicked. Unfortunately if I cannot use IE functions, then I have to resort to the long and awkward way of using standard AutoItX3 functions, such as tabbing n amount of times to the correct link and pressing the Enter key to select the link. Or a text field that doesn't have focus, I need to tab n amount of times to the correct field and sending keystrokes, whereas using an IE function will give me a reference to that field in order for me to set a value for it.

Unless there isn't any solution I will have to resort to what I said above. It would be nice to have Javascript interaction with AutoItX3.

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