Busti Posted September 3, 2006 Share Posted September 3, 2006 hi guys (and girls ), why does this code crash ? expandcollapse popup; Author: Kåre Johansson ; AutoIt Version: 3.1.1.55 ; Description: Very Simple example: Embedding RICHTEXT object ; Needs: MSCOMCT2.OCX in system32 but it's probably already there ; Date: 3 jul 2005 #include <GUIConstants.au3> $oRP = ObjCreate("RICHTEXT.RichtextCtrl.1") GUICreate ( "Embedded RICHTEXT control Test", 320, 200, -1, -1,BitOr($WS_OVERLAPPEDWINDOW,$WS_VISIBLE,$WS_CLIPSIBLINGS)) $TagsPageC = GuiCtrlCreateLabel('Visit Tags Page', 5, 180, 100, 15, $SS_CENTER) GuiCtrlSetFont($TagsPageC,9,400,4) GuiCtrlSetColor($TagsPageC,0x0000ff) GuiCtrlSetCursor($TagsPageC,0) $AboutC = GUICtrlCreateButton('About',105,177,70,20) $PrefsC = GUICtrlCreateButton('FontSize',175,177,70,20) $StatC = GUICtrlCreateButton('Plain Style',245,177,70,20) $GUIActiveX = GUICtrlCreateObj( $oRP, 10, 10 , 400 , 260 ) GUICtrlSetPos($GUIActiveX,10,10,300,160) $LinkoRP = ObjEvent($oRP,"IEEvent_","FolderView"); this is a dummy event handle With $oRP; Object tag pool .OLEDrag() .SelBullet = True .text = "hello - Au3 supports ActiveX components like the RICHTEXT thanks to SvenP" & @CRLF & 'Try write some text and quit to reload' If FileExists("C:\RichText.rtf") Then .LoadFile("C:\RichText.rtf", 0) .Enabled = True .HideSelection = False .SaveFile("C:\RichText.rtf", 0 ) .SelStart = 0 .SelLength = StringLen(.Text) .SelFontSize = 14 .SelBold = True .SelItalic = True .SelUnderline = True EndWith GUISetState ();Show GUI While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE $oRP.SaveFile("C:\RichText.rtf", 0 ) ExitLoop Case $msg = $TagsPageC Run(@ComSpec & ' /c start http://www.officecomputertraining.com/vbtutorial/tutpages/page36.asp','', @SW_HIDE) Case $msg = $AboutC $oRP.AboutBox() Case $msg = $PrefsC $oRP.SelFontSize = 12 Case $msg = $StatC $oRP.SelBold = False $oRP.SelItalic = False $oRP.SelUnderline = False EndSelect WEnd $oRP = 0 GUIDelete () Exit with the error : >"E:\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "D:\Dokumente und Einstellungen\AndiT\Desktop\script0r\Tests & includes\ritchtextbox.au3" /autoit3dir "E:\AutoIt3" /UserParams +> Starting AutoIt3Wrapper v.1.7.1 >Running:(3.1.1.133):E:\AutoIt3\autoit3.exe "D:\Dokumente und Einstellungen\AndiT\Desktop\script0r\Tests & includes\ritchtextbox.au3" D:\Dokumente und Einstellungen\AndiT\Desktop\script0r\Tests & includes\ritchtextbox.au3 (23) : ==> Only Object-type variables allowed in an "With" statement.: With $oRP With ^ ERROR +>AutoIT3.exe ended.rc:0 >Exit code: 0 Time: 2.062 My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity Link to comment Share on other sites More sharing options...
MHz Posted September 3, 2006 Share Posted September 3, 2006 Looks like the example out of the helpfile. You perhaps have the same problem that I have of not being a licensed user of the RICHTEXT object . Installing an IDE... that has the object available for use may license the OS to use the RICHTEXT control. Link to comment Share on other sites More sharing options...
Busti Posted September 3, 2006 Author Share Posted September 3, 2006 were to get the ide ? My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity Link to comment Share on other sites More sharing options...
MHz Posted September 3, 2006 Share Posted September 3, 2006 were to get the ide ?Visual Studio IDE and the likes are distributed by Microsoft. Not sure of other distributers available. You may need something more then the basic version to get the richedit control to use. But even then, any pc that the autoit script would run on would also need the license to use the richedit control. I have not found an easy way to enable the license for the richedit control without installing a programming IDE such as mentioned previously. Link to comment Share on other sites More sharing options...
Busti Posted September 3, 2006 Author Share Posted September 3, 2006 can you give me dl links or say me how i get it ? becouse before i formattet my computer it worked.. My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity Link to comment Share on other sites More sharing options...
Busti Posted September 3, 2006 Author Share Posted September 3, 2006 *push* My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity Link to comment Share on other sites More sharing options...
Busti Posted September 4, 2006 Author Share Posted September 4, 2006 *bump* My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity Link to comment Share on other sites More sharing options...
Confuzzled Posted September 5, 2006 Share Posted September 5, 2006 Go bump at www.microsoft.com Link to comment Share on other sites More sharing options...
MHz Posted September 5, 2006 Share Posted September 5, 2006 can you give me dl links or say me how i get it ? becouse before i formattet my computer it worked..I have no idea for a easy fix. I'm personally not installing a full development IDE for the sake of just a rich edit control licence. Your one up on me if you have had it working before. 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