Jump to content

HTML5 svg and _IECreateEmbedded


Go to solution Solved by DaleHohm,

Recommended Posts

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.

Link to comment
Share on other sites

  • Solution

_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

Link to comment
Share on other sites

  • 1 month later...

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.

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