Jump to content

IE UDF capabilities question


Recommended Posts

I'm trying to use javascript functions that require html5. I know my browser has the capability of doing html5 because these functions work outside of my app, but when I try to call them inside the app they just don't happen. It doesn't make sense to me so I'm wondering what's going on. Can I use HTML5 when I'm using the IE embedded in an app?

Specifically, I'm trying to call the Filereader() function.

Edited by Champak
Link to comment
Share on other sites

  • Moderators

Try my >IE Extended LIbrary, it has functions to work with embedded versions, as well as the ability to change them to suit your html / dom needs.

Be weary of getclassname javascript functions and IE8, I have not found (had time to find) a work around to fix the issue that Dan pointed out yet.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Thanks to both

JohnOne, why is it IE7 and not the IE "installed" on the computer? Is there any way to make it look at the IE I'm using or is it just not compatible?

Smoke_N, that looks good, but from the surface if I'm not mistaken it looks like the JavaScript function will be handled in the autoit environment as opposed to being handled in the html javascript environment, meaning the autoit function will call the JavaScript and then hold all other autoit functions until the JavaScript function completes to complete the original autoit function. I wanted to keep the function strictly in the html environment that way my other autoit functions can run seamlessly parallel to what is going on with my javascript stuff. I can actually achieve what I'm trying to do without the JavaScript all in the autoit environment already, but that brings me back to functions pausing/waiting for other functions to complete. Hence, me doing everything in the html. I hope what I said was clear.

I'm updating the Google map udf in my app to do a whole lot more and trying to keep all the functions strictly in that html/javascript window environment in the head to leave autoit free to do all the other things I need.

Link to comment
Share on other sites

  • Moderators

Not sure what exactly you're looking at.

It basically sets the IE version to use using the registry with these two functions:

_IEEx_EmbeddedGetVersion()
_IEEx_EmbeddedSetVersion()
 
The reason why default is generally IE7 for embedded browsers is because it uses Shell.Application versus InternetExplorer.Application.
 
InternetExplorer.Application object is what _IECreate uses, that object uses your default browser
Shell.Application object is like sort of like your folder browser, its what is used to embed.
 
Is that the only way to embed? Certainly not, but it is the most consistent and easiest to maintain.
 
The functions I've provided basically gets the current embedded version as well as allows you to set the embedded browser version.
 
You can open a browser with _IECreate in invisible mode to get the major version with (_IEEx_GetAppMajorVersion()), or use the default settings with _IEEx_EmbeddedSetVersion() just to have it find the latest version and set it, eg:
 
; includes etc
_IEEx_EmbeddedSetVersion(); default will set to highest version found by filegetversion
; scripting here
; guicreate
; embed
; etc
; rest of script

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

ok got it.

Two problems though, after I put the IEEx in the include its telling me it cant open it, and I also changed the "" to <> and still nothing.

So I put the entire IEEx into the versionchangeexample and I keep getting the following in the console:

Embedded is running version: 7
Embedded version: 7
Major version: 0

I'm running win8.1, autoit 3.3.12, IE11

Link to comment
Share on other sites

It looks like I had to put the '11' in the _IEEx_EmbeddedSetVersion(), it's not automatically setting it to the highest IE without that parameter. However I ran into another problem that I think made this all for not. It looks like the FileReader() only works with an input and button element, I cannot hard code the local file path and pass it in a variable. If anyone knows this to be different please let me know.

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