Andreik Posted July 26, 2010 Share Posted July 26, 2010 (edited) I just started to use OLE/COM Objects Viewer and I have some troubles to understand what I need to do with informations got from there. For example I created an control with class name AUDIOCONTROLS2.CurveEditCtrl.1 and I want to know how to use properties and methods for this object. For example how can I use the HorizontalLines property?This is the code to test if the object is created without problems.$MAIN = GUICreate("Curve Edit Control",400,400) $OBJ = ObjCreate("AUDIOCONTROLS2.CurveEditCtrl.1") GUICtrlCreateObj($OBJ,5,5,390,390) GUISetState(@SW_SHOW,$MAIN) While True Switch GUIGetMsg() Case -3 Exit EndSwitch Sleep(10) WEnd Edited July 26, 2010 by Andreik When the words fail... music speaks. Link to comment Share on other sites More sharing options...
taietel Posted July 26, 2010 Share Posted July 26, 2010 Andreik, this is how I do it: load the control in a VB6 form, press F2 and look there. Also, if you type in the code window, you can see in the autocomplete properties, methods ... Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
ProgAndy Posted July 26, 2010 Share Posted July 26, 2010 You should be able to do this: $obj.HorizontalLines = 123 $lines = $obj.HorizontalLines $obj.AddPoint(...) $obj.Reset() $number = $obj.GetNumberOfCurves() *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Andreik Posted July 26, 2010 Author Share Posted July 26, 2010 (edited) I tried also "$obj.HorizontalLines = some number" but all time I got this error and I don't know why, because I didn't get any error when I create the object.The requested action with this object has failed. Edited July 26, 2010 by Andreik When the words fail... music speaks. Link to comment Share on other sites More sharing options...
ProgAndy Posted July 26, 2010 Share Posted July 26, 2010 Maybe the property is read-only? *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Andreik Posted July 26, 2010 Author Share Posted July 26, 2010 Maybe the property is read-only?Is there any way to check that? When the words fail... music speaks. Link to comment Share on other sites More sharing options...
taietel Posted July 26, 2010 Share Posted July 26, 2010 Andreik, have you checked if the object was created? Put this under $OBJ.... If IsObj($OBJ) Then ConsoleWrite("Object created!") Else ConsoleWrite("Not created...") EndIf Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
Andreik Posted July 26, 2010 Author Share Posted July 26, 2010 @taietel ma nu is idiot, stiu daca am un obiect valid sau nu si daca citeai cu atentie tot ce am scris in primul post vedeai ca am un obiect valid fiindca am folosit cu succes obiectul ca sa creez un control pentru GUI. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
taietel Posted July 26, 2010 Share Posted July 26, 2010 1. Andreik, daca rulez scriptul tau pe win7 (FARA Nero instalat) si daca in loc de "AUDIOCONTROLS2.CurveEditCtrl.1" scriu "OBIECT.AIUREA.1", obtin acelasi rezultat (scriptul RULEAZA FARA EROARE): doar form-ul principal! (verifica daca am dreptate sau nu)2. Am intrat pe XP si acolo am putut sa creez obiectul (NERO=instalat). In VB6 nu am erori, pot sa setez liniile orizontale/verticale, dar in AutoIt formul apare o fractione de secunda si apoi imi apare eroarea incepand de la .HorizontalLines.3. SUB NICI O FORMA nu am considerat ce ai scris mai sus!!! Respect toti utilizatorii acestui forum, indiferent de experienta pe care o au sau de numarul de postari. Daca ti-am dat de inteles altceva, imi cer scuze! M.I.P.S. For Mods: If the this text needs to be translated, just ask. Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
Andreik Posted July 26, 2010 Author Share Posted July 26, 2010 ^Is not working with OBIECT.ANYTHING.1 I`m using WinXP. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
taietel Posted July 26, 2010 Share Posted July 26, 2010 The script (as is) gives NO ERRORS (that's why I said working) on object creation, because there isn't any error checking. If you modify that script and try to access the properties/methods of the object, THEN you will have message errors. That's what I was thinking about...M.I. Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text 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