BrettF Posted January 19, 2007 Share Posted January 19, 2007 My Code: $oPlayer = GUICtrlCreateObj("WMPlayer.OCX", 8, 0, 537, 281) If Not IsObj($oPlayer) Then MsgBox(0, "Error", "$oPlayer is not an Object.") Else MsgBox(0, "Error", "Successfully created Object $oPlayer.") EndIf $Button1 = GUICtrlCreateButton("", 360, 328, 41, 41, 0,$BS_BITMAP) GUICtrlSetImage ($Button1, @ScriptDir & "\play.bmp" ) My Problems: First of all, I can't get the image to show on the button And $oPlayer is always returning- "$oPlayer is not an Object.". It will never show. , and where is the MSDN libary of wmplayer controls?? I cant find them anywhere... ...and ive looked hard. Thanks Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted January 19, 2007 Moderators Share Posted January 19, 2007 You must first create the object before creating the GUI Object. #include <GUIConstants.au3> $oPlayer = ObjCreate("WMPlayer.OCX") If Not IsObj($oPlayer) Then MsgBox(0, "Error", "$oPlayer is not an Object.") Else MsgBox(0, "Error", "Successfully created Object $oPlayer.") EndIf GUICreate("Test") $hPlayer = GUICtrlCreateObj($oPlayer, 8, 0, 537, 281) $Button1 = GUICtrlCreateButton("", 360, 328, 41, 41, 0, $BS_BITMAP) GUICtrlSetImage($Button1, @ScriptDir & "\play.bmp") GUISetState() While 1 Sleep(100) WEnd Link to comment Share on other sites More sharing options...
BrettF Posted January 20, 2007 Author Share Posted January 20, 2007 You must first create the object before creating the GUI Object. #include <GUIConstants.au3> $oPlayer = ObjCreate("WMPlayer.OCX") If Not IsObj($oPlayer) Then MsgBox(0, "Error", "$oPlayer is not an Object.") Else MsgBox(0, "Error", "Successfully created Object $oPlayer.") EndIf GUICreate("Test") $hPlayer = GUICtrlCreateObj($oPlayer, 8, 0, 537, 281) $Button1 = GUICtrlCreateButton("", 360, 328, 41, 41, 0, $BS_BITMAP) GUICtrlSetImage($Button1, @ScriptDir & "\play.bmp") GUISetState() While 1 Sleep(100) WEnd It returns "$oPlayer is not an Object."... What should i have installed but probably wouldnt? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
BrettF Posted January 20, 2007 Author Share Posted January 20, 2007 I updated WMplayer and everything works fine Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted January 22, 2007 Moderators Share Posted January 22, 2007 Your welcome. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now