Sign in to follow this  
Followers 0
ChuckS

Help using an ObjectID

4 posts in this topic

Hello All,

I am having difficulty in getting an Object to work. I have been through the forum several time trying to piece something together but so far I have come up with nothing, Although I did learn much about other things in my search so it wasn't a waste of time.

In short I want to use the Snapshot Viewer to view an MS-Access report. I can get it to work if I create an ASP page an use the Embedded IE to call the asp page but I would prefer not to do it that way. I know Autoit can perform these tasks based on other examples such as embedding Media Player controls and such but I am missing something.

Here is the Object and Parameters I used in the ASP page.

<OBJECT ID="SnapshotViewer1" WIDTH=750 HEIGHT=500 codebase="Snapview.ocx"
     CLASSID="CLSID:F0E42D60-368C-11D0-AD81-00A0C90DC8D9" VIEWASTEXT>
        <PARAM NAME="_Version" VALUE="65536">
        <PARAM NAME="SnapshotPath" VALUE="RMR.snp">
        <PARAM name="Zoom" VALUE="0">
        <PARAM name="AllowContextMenu" VALUE="-1">
        <PARAM name="ShowNavigationButtons" VALUE="-1">
    </OBJECT>

I have hard coded what I can to make is easier to follow.

If one of you Autoit gods could just send me in the right direction that would be great. To start me off all I need is either an example I can build from or a simple GUI that calls this. Nothing fancy.

Many thanks

Share this post


Link to post
Share on other sites



Perhaps I don't follow you, but this will create a webpage on the fly without the need for an asp page on the server:

$sHTML = ''
$sHTML &= 'Here is the object:<p>'
$sHTML &= ' <OBJECT ID="SnapshotViewer1" WIDTH=750 HEIGHT=500 codebase="Snapview.ocx"'
$sHTML &= '  CLASSID="CLSID:F0E42D60-368C-11D0-AD81-00A0C90DC8D9" VIEWASTEXT>'
$sHTML &= '     <PARAM NAME="_Version" VALUE="65536">'
$sHTML &= '     <PARAM NAME="SnapshotPath" VALUE="RMR.snp">'
$sHTML &= '     <PARAM name="Zoom" VALUE="0">'
$sHTML &= '     <PARAM name="AllowContextMenu" VALUE="-1">'
$sHTML &= '     <PARAM name="ShowNavigationButtons" VALUE="-1">'
$sHTML &= ' </OBJECT>'

$oIE = _IECreate()
_IEBodyWriteHTML($oIE, $sHTML)

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

Thanks for the reply DaleHohm.

I am trying to get away from using html altogether and use the object directly from within the script.

Been reading up on the Obj/COM reference in the help file but I am still missing something.

The code I posted previously is more for VB which is why it worked in an ASP script.

My apologies for not being a little clearer in the opening post. :">

Share this post


Link to post
Share on other sites

Ah, in that case, suggest you read up on the OLE/COM Object Viewer in the Obj/COM section of the helpfile.

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

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  
Followers 0