Jump to content
Sign in to follow this  
Andreik

HTML5 svg and _IECreateEmbedded

Recommended Posts

Andreik

I try to load a html5 page with a svg into my application using _IECreateEmbedded but seems it doesn't work even with IE version 10, that should support svg. Can anyone try this code to see if it works?

#include <IE.au3>

Local $sHTML
$sHTML &= '<!DOCTYPE html>'
$sHTML &= '<html>'
$sHTML &= '<body>'
$sHTML &= '<svg width="300" height="200">'
$sHTML &= '   <polygon points="100,10 40,180 190,60 10,60 160,180"'
$sHTML &= '   style="fill:lime;stroke:purple;stroke-width:5;fill-rule:evenodd;" />'
$sHTML &= '   Sorry, your browser does not support inline SVG.'
$sHTML &= '</svg>'
$sHTML &= '</body>'
$sHTML &= '</html>'


$oIE = _IECreateEmbedded()
$hMain = GUICreate("Test",800,600)
$hActiveX = GUICtrlCreateObj($oIE,0,0,800,600)
_IENavigate($oIE,"about:blank")
_IEDocWriteHTML($oIE,$sHTML)
GUISetState(@SW_SHOW,$hMain)

Do
    Sleep(10)
Until GUIGetMsg() = -3

I used this code to test what is supported and what not and SVG seems to be supported:

#include <IE.au3>


$oIE = _IECreateEmbedded()
$hMain = GUICreate("Test",800,600)
$hActiveX = GUICtrlCreateObj($oIE,0,0,800,600)
_IENavigate($oIE,"http://html5test.com/")
GUISetState(@SW_SHOW,$hMain)

Do
    Sleep(10)
Until GUIGetMsg() = -3
Edited by Andreik

When the words fail... music speaks

Share this post


Link to post
Share on other sites
Andreik

I checked with _IE_VersionInfo() and I got this:

 

T

3
0
1
20130601
T3.0-1

I don't really know what this mean but seems to be not a very old version, from June 2013.


When the words fail... music speaks

Share this post


Link to post
Share on other sites
DaleHohm

_IE_VersionInfo() relates to IE.au3, not the browser.  Danp2 is correct.

Take a look at my sig for alternatives to _IECreateEmbedded that use the fill browser instance and act as though they are embedded.

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
trancexx

The X-UA-Compatible meta tag should do the trick. Try it.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
Andreik

Thanks Dale, seems to work.

@trancexx Thanks for your input. I tried this meta tag but it doesn't work. :ermm:

Edited by Andreik

When the words fail... music speaks

Share this post


Link to post
Share on other sites
JohnOne

Just occurred to me that there is also a reg key to render using later IE versions, might be worth a look.

http://msdn.microsoft.com/en-us/library/ee330730%28v=vs.85%29.aspx#browser_emulation


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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  

×