Jump to content

BrowserControl Companion


Gianni
 Share

Recommended Posts

lir4Owv.png

Making the integration between AutoIt and the BrowserControl easier may facilitate the development of interesting programs. Just think of all those (fantastic) libraries and frameworks available for javascript that could be integrated and exploited in an AutoIt program. For example, to graphically present the results of an AutoIt processing in the GUI, ... and many other possibilities. Providing the basic functions to implement this synergistic interaction is the purpose of this post (if for no other reason, just even to collect some tests done over time here and there, so as not to leave them scattered and easily find them in just one place)
In this UDF there are only a few functions (or better if called wrappers), but I hope to add more as I go and, even better, to receive suggestions and advice on new features and techniques to improve and expand it.

_WebBrowser_GUICtrlCreate      Create an Internet Explorer 'Browser Control'
 _WebBrowser_SetHTML            Set a new HTML listing in the BrowserControl
 _WebBrowser_CSS_Inject         Creates into the html document a CSS node element with embedded the passed CSS
 _WebBrowser_JS_Inject          Creates into the html document a javascript node element with embedded the passed javascript
 _WebBrowser_JS_Eval            Evaluates a passed string as JavaScript code and executes it
 _WebBrowser_JS_setTimeout      Calls a javascript function or executes a javascript code snippet [option after a specified delay]
 _WebBrowser_JS_ElementGetRef   Retrieves a reference to an element suitable to be used from AutoIt
 _WebBrowser_ExecuteDotNotation Get a reference to an object's child member or the value of a property, by means of a dotted path
 _WebBrowser_BasicHTML          Returns a basic html page listing (a little enhanced than about:blank)

The three examples provided in the attached ziped file are a bit 'improvised' and do not take advantage of all the possibilities offered by the underlying javascript libraries used. They are just three "hello world" scripts to test the ABC of the interaction with the "BrowserControl".
(ToDo: Interaction with javascript custom events)
Bug reports, creative criticisms and suggestions (particularly regarding the interaction with javascript custom events) are welcome
I hope you can have fun with the Browser Control

BrowserControl.zip

Edited by Chimp

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to comment
Share on other sites

  • 3 months later...
  • 7 months later...

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

×
×
  • Create New...