Jump to content

ObjGet problem


Champak
 Share

Recommended Posts

I touched on this lightly on another post, but now am making it a main post because it doesn't make sense. If no answer here, I'll submit it as a bug. Why won't object get work on WMP? It has worked on anything else I've tried with an object. The object is correct because I can create it. I'm using WMP11. Am I doing something wrong?

$oWMP = ObjGet("","WMPlayer.OCX")   ; Get an existing WMP Object

if @error then 
Msgbox (0,"WMPtest","Error Getting an active WMP Object. Error code: " & hex(@error,8))
  Else
MsgBox(0,"Good","I See You")
endif
Link to comment
Share on other sites

Not all COM object register themselves in the ROT (running object table). If not there, ObjGet does not work. ObjGet does not work on InternetExplorer and many others either. So, it is not likely a bug.

FYI, On something like this you should also try converting your code to VBScript and testing it there before considering raising a bug for AutoIt.

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

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