BugFix Posted March 10, 2008 Posted March 10, 2008 To be honest, i have never got problems when i used + instead of BitOR, i know that there is a different, and i will appreciate if you (or someone) could explain to me how the BitOR really works here. Hi, the different is small but important. With "+" you add every value, also if this value always exists! With "BitOr" you can only add new values. $a = BitOR(1,2,4,8) ConsoleWrite('Result: ' & $a & @CRLF) $a = (1+2+4+8) ConsoleWrite('Result like before: ' & $a & @CRLF) $a = BitOR(1,2,4,8,4,8) ; 4 and 8 2-times ==> BUT NOT added!! ConsoleWrite('Result: ' & $a & @CRLF) $a = (1+2+4+8+4+8) ; 4 and 8 2-times ==> AND ALSO added!! ConsoleWrite('Result is different: ' & $a & @CRLF) Best Regards BugFix
MrCreatoR Posted March 10, 2008 Posted March 10, 2008 Hi, the different is small but important. With "+" you add every value, also if this value always exists! With "BitOr" you can only add new values. $a = BitOR(1,2,4,8) ConsoleWrite('Result: ' & $a & @CRLF) $a = (1+2+4+8) ConsoleWrite('Result like before: ' & $a & @CRLF) $a = BitOR(1,2,4,8,4,8) ; 4 and 8 2-times ==> BUT NOT added!! ConsoleWrite('Result: ' & $a & @CRLF) $a = (1+2+4+8+4+8) ; 4 and 8 2-times ==> AND ALSO added!! ConsoleWrite('Result is different: ' & $a & @CRLF) Perfect, simple and understandable! Thank you! Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
martin Posted March 10, 2008 Posted March 10, 2008 Perfect, simple and understandable! Thank you!Good example. Some styles are the combination of 2 or more styles. You might not know that and add the style again giving a style which you didn't want at all, but with BitOr there is no problem. Your Toggle function could do something like this so you needed know what styles already exist #include <WinAPI.au3> . . ;if $iFlag = 0 then turn style off, else turn it on Func _GUICtrlChangeStyle($hWnd_Parent, ByRef $h_Control, $StyleToChange,$iFlag=0) Local $oldstyle = _API_GetWindowLong ($h_Control, $GWL_STYLE) If $iFlag = 0 Then $nNewStyle = BitAnd($oldstyle,BitNot( $styleToChange)) else $nNewStyle = BitOr($oldstyle,$styleToChange) endif . . . Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
MrCreatoR Posted March 10, 2008 Posted March 10, 2008 Your Toggle function could do something like this so you needed know what styles already existHm... i tried that (as you ca see in my first atempt), and first time it didn't work as i expected... i guess i shouldn't use Hex on returned Long Thanks! Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
martin Posted March 10, 2008 Posted March 10, 2008 Hm... i tried that (as you ca see in my first atempt),..Oh yes, sorry, I'm not paying attention. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
MrCreatoR Posted March 10, 2008 Posted March 10, 2008 Rich Edit have limitation on text content lenght? it seems that the limit is 33750 chars (33496 bytes).expandcollapse popup#include <Misc.au3> #include "GuiRichEdit.au3" Global $h_RichEdit _Main() Func _Main() Local $msg, $hgui, $button Local $mnuOptions, $mnuBKColor, $mnuResetBKColor Local $bkcolor, $bkcolor_save = 16777215, $lResult $hgui = GUICreate("Rich Edit Example", 500, 550, -1, -1, _ BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_SIZEBOX)) $mnuOptions = GUICtrlCreateMenu("Options") $mnuBKColor = GUICtrlCreateMenuItem("Set Back Color of Control", $mnuOptions) $mnuResetBKColor = GUICtrlCreateMenuItem("Reset Back Color of Control", $mnuOptions) $button = GUICtrlCreateButton("Exit", 100, 460, 100, 25) $h_RichEdit = _GUICtrlRichEditCreate($hgui, 10, 10, 480, 420, _ BitOR($ES_WANTRETURN, $WS_HSCROLL, $ES_SUNKEN, $ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) GUICtrlSetResizing($h_RichEdit, $GUI_DOCKAUTO) _GUICtrlRichEditInsertText($h_RichEdit, 'Testing...' & @CRLF) GUISetState(@SW_SHOW) Local $sData_Text = "" For $i = 1 To 33750 If $i = 33750 Then $sData_Text = StringTrimRight($sData_Text, StringLen("Here is the limit")) & "Here is the limit" ExitLoop Else $sData_Text &= "This is a test" & @CRLF EndIf Next _GUICtrlRichEditSetText($h_RichEdit, $sData_Text) ControlFocus($hgui, "", $h_RichEdit) ControlSend($hgui, "", $h_RichEdit, "^{END}") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $button ; controls commands don't work here if using wm_command Exit Case $msg = $GUI_EVENT_RESIZED _SendMessage($h_RichEdit, $EM_REQUESTRESIZE) Case $msg = $mnuBKColor $bkcolor = _ChooseColor(0, 16777215, 0, $hgui) If Not @error Then $bkcolor_save = _SendMessage($h_RichEdit, $EM_SETBKGNDCOLOR, 0, $bkcolor) EndIf Case $msg = $mnuResetBKColor _SendMessage($h_RichEdit, $EM_SETBKGNDCOLOR, 1, $bkcolor_save) EndSelect WEnd EndFunc ;==>_MainAny ideas on how to overcome this limit? P.STested with 3.2.8.1 and 3.2.10.0. Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
martin Posted March 11, 2008 Posted March 11, 2008 Rich Edit have limitation on text content lenght? it seems that the limit is 33750 chars (33496 bytes).The number of characters in $sData_Text is 539,984 when it gets to the limit you have given, but your limit is the number of lines not characters. Did you mean lines? Without the @CRLF it can take a lot more characters.I see your example has a horizontal scroll but it word wraps as well. What makes the difference because I thought that was a problem? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
MrCreatoR Posted March 11, 2008 Posted March 11, 2008 The number of characters in $sData_Text is 539,984 when it gets to the limit you have given, but your limit is the number of lines not characters. Did you mean lines?Yes you are right, i just mixed here different things... but the point is that there is a limit .But it seems that «RICHTEXT.RichtextCtrl» object does not have this limitation... (but it have others ). Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
grham Posted March 12, 2008 Posted March 12, 2008 Yes you are right, i just mixed here different things... but the point is that there is a limit .But it seems that «RICHTEXT.RichtextCtrl» object does not have this limitation... (but it have others ).Yes, this is by default, butwith this:_SendMessage($the_handel_ of_ your_ richedit, $EM_LIMITTEXT, $put_here_the_number_of_caracters_as_a_limit!, 0)you can increase it.
MrCreatoR Posted March 14, 2008 Posted March 14, 2008 (edited) Yes, this is by default, butwith this:_SendMessage($the_handel_ of_ your_ richedit, $EM_LIMITTEXT, $put_here_the_number_of_caracters_as_a_limit!, 0)you can increase it.Thanks, work great!P.SMaybe there is some kind of constant that determine the unlimited number of characters? Edit: i supose -1 is my answer, just need someone to confirm... Edited March 14, 2008 by MsCreatoR Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
JoEtHeKiLlEr Posted April 26, 2008 Posted April 26, 2008 I'm looking for something like this:can sb. tell me how to change the Color of the text? I haven't a clue of _GUICtrlRichEditSetFormat.. how should it work? what do i have to use as $dwMask?thx
martin Posted April 26, 2008 Posted April 26, 2008 can sb. tell me how to change the Color of the text? I haven't a clue of _GUICtrlRichEditSetFormat.. how should it work? what do i have to use as $dwMask?thxHave a look here. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Zedna Posted April 26, 2008 Posted April 26, 2008 Thanks, work great!P.SMaybe there is some kind of constant that determine the unlimited number of characters? Edit: i supose -1 is my answer, just need someone to confirm...Look here: http://msdn2.microsoft.com/en-us/library/b...607(VS.85).aspx Resources UDF ResourcesEx UDF AutoIt Forum Search
BrettF Posted June 6, 2008 Posted June 6, 2008 (edited) I can't get it to work with the latest version... Just the consts erroring. I'm going through it now, and I'll give an update list soon List of constants: expandcollapse popup#include-once #include <GUIConstants.au3> #include <Misc.au3> #include <Memory.au3> #include <EditConstants.au3> #include <WindowsConstants.au3> Global Const $DebugIt = 1 ;Global Const $WM_NOTIFY = 0x4E ;~ Global Const $WM_USER = 0x400 Global Const $RICHEDIT_CLASS10A = "RICHEDIT" Global Const $RICHEDIT_CLASS = $RICHEDIT_CLASS10A Global Const $RICHEDIT_CLASSA = "RichEdit20A" Global Const $RICHEDIT_CLASSW = "RichEdit20W" Global Const $ICC_STANDARD_CLASSES = 0x4000 Global Const $ST_DEFAULT = 0 Global Const $ST_KEEPUNDO = 1 Global Const $ST_SELECTION = 2 ; pitch and family ;~ If Not IsDeclared("DEFAULT_PITCH") Then Global Const $DEFAULT_PITCH = 0 ;Global Const $FIXED_PITCH = 1 ;Global Const $VARIABLE_PITCH = 2 ;Global Const $FF_DECORATIVE = 80 ;~ If Not IsDeclared("FF_DONTCARE") Then Global Const $FF_DONTCARE = 0 ;Global Const $FF_ROMAN = 16 ;Global Const $FF_SWISS = 32 ;Global Const $FF_MODERN = 48 ;Global Const $FF_SCRIPT = 64 ;Global Const $FW_DONTCARE = 0 ;Global Const $FW_THIN = 100 ;Global Const $FW_EXTRALIGHT = 200 ;Global Const $FW_ULTRALIGHT = 200 ;Global Const $FW_LIGHT = 300 ;Global Const $FW_NORMAL = 400 ;Global Const $FW_REGULAR = 400 ;Global Const $FW_MEDIUM = 500 ;Global Const $FW_SEMIBOLD = 600 ;Global Const $FW_DEMIBOLD = 600 ;Global Const $FW_BOLD = 700 ;Global Const $FW_EXTRABOLD = 800 ;Global Const $FW_ULTRABOLD = 800 ;Global Const $FW_HEAVY = 900 ;Global Const $FW_BLACK = 900 ; char sets ;Global Const $ANSI_CHARSET = 0 ;Global Const $DEFAULT_CHARSET = 1 ;Global Const $SYMBOL_CHARSET = 2 ;Global Const $MAC_CHARSET = 77 ;Global Const $SHIFTJIS_CHARSET = 128 ;Global Const $HANGEUL_CHARSET = 129 ;Global Const $GB2312_CHARSET = 134 ;Global Const $CHINESEBIG5_CHARSET = 136 ;Global Const $GREEK_CHARSET = 161 ;Global Const $TURKISH_CHARSET = 162 ;Global Const $VIETNAMESE_CHARSET = 163 ;Global Const $BALTIC_CHARSET = 186 ;Global Const $RUSSIAN_CHARSET = 204 ;Global Const $OEM_CHARSET = 255 ;Global Const $CFU_UNDERLINENONE = 0 ;Global Const $CFU_UNDERLINE = 1 ;Global Const $CFU_UNDERLINEWORD = 2 ;Global Const $CFU_UNDERLINEDOUBLE = 3 ;Global Const $CFU_UNDERLINEDOTTED = 4 ; code pages Global Const $CP_ACP = 0; use system default Global Const $CP_37 = 37 Global Const $CP_273 = 273 Global Const $CP_277 = 277 Global Const $CP_278 = 278 Global Const $CP_280 = 280 Global Const $CP_284 = 284 Global Const $CP_285 = 285 Global Const $CP_290 = 290 Global Const $CP_297 = 297 Global Const $CP_423 = 423 Global Const $CP_500 = 500 Global Const $CP_875 = 875 Global Const $CP_930 = 930 Global Const $CP_931 = 931 Global Const $CP_932 = 932 Global Const $CP_933 = 933 Global Const $CP_935 = 935 Global Const $CP_936 = 936 Global Const $CP_937 = 937 Global Const $CP_939 = 939 Global Const $CP_949 = 949 Global Const $CP_950 = 950 Global Const $CP_1027 = 1027 Global Const $CP_5026 = 5026 Global Const $CP_5035 = 5035 Global Const $CFM_ALLCAPS = 0x80 Global Const $CFM_ANIMATION = 0x40000 Global Const $CFM_BACKCOLOR = 0x4000000 Global Const $CFM_BOLD = 0x1 Global Const $CFM_CHARSET = 0x8000000 Global Const $CFM_COLOR = 0x40000000 Global Const $CFM_DISABLED = 0x2000 Global Const $CFM_EMBOSS = 0x800 Global Const $CFM_FACE = 0x20000000 Global Const $CFM_HIDDEN = 0x100 Global Const $CFM_IMPRINT = 0x1000 Global Const $CFM_ITALIC = 0x2 Global Const $CFM_KERNING = 0x100000 Global Const $CFM_LCID = 0x2000000 Global Const $CFM_LINK = 0x20 Global Const $CFM_OFFSET = 0x10000000 Global Const $CFM_OUTLINE = 0x200 Global Const $CFM_PROTECTED = 0x10 Global Const $CFM_REVAUTHOR = 0x8000 Global Const $CFM_REVISED = 0x4000 Global Const $CFM_SHADOW = 0x400 Global Const $CFM_SIZE = 0x80000000 Global Const $CFM_SMALLCAPS = 0x40 Global Const $CFM_SPACING = 0x200000 Global Const $CFM_STRIKEOUT = 0x8 Global Const $CFM_STYLE = 0x80000 Global Const $CFM_SUBSCRIPT = BitOR(0x10000, 0x20000) Global Const $CFM_SUPERSCRIPT = $CFM_SUBSCRIPT Global Const $CFM_UNDERLINE = 0x4 Global Const $CFM_UNDERLINETYPE = 0x800000 Global Const $CFM_WEIGHT = 0x400000 Global Const $CFE_ALLCAPS = $CFM_ALLCAPS Global Const $CFE_AUTOBACKCOLOR = $CFM_BACKCOLOR Global Const $CFE_AUTOCOLOR = 0x40000000 Global Const $CFE_BOLD = 0x1 Global Const $CFE_DISABLED = $CFM_DISABLED Global Const $CFE_EMBOSS = $CFM_EMBOSS Global Const $CFE_HIDDEN = $CFM_HIDDEN Global Const $CFE_IMPRINT = $CFM_IMPRINT Global Const $CFE_ITALIC = 0x2 Global Const $CFE_LINK = 0x20 Global Const $CFE_OUTLINE = $CFM_OUTLINE Global Const $CFE_PROTECTED = 0x10 Global Const $CFE_REVISED = $CFM_REVISED Global Const $CFE_SHADOW = $CFM_SHADOW Global Const $CFE_SMALLCAPS = $CFM_SMALLCAPS Global Const $CFE_STRIKEOUT = 0x8 Global Const $CFE_SUBSCRIPT = 0x10000 Global Const $CFE_SUPERSCRIPT = 0x20000 Global Const $CFE_UNDERLINE = 0x4 ;~ Global Const $CFM_EFFECTS = BitOR($CFM_BOLD, $CFM_ITALIC, $CFM_UNDERLINE, $CFM_COLOR, $CFM_STRIKEOUT, $CFE_PROTECTED, $CFM_LINK) ;~ Global Const $CFM_ALL = BitOR($CFM_EFFECTS, $CFM_SIZE, $CFM_FACE, $CFM_OFFSET, $CFM_CHARSET) Global Const $SCF_DEFAULT = 0x0 Global Const $SCF_SELECTION = 0x1 Global Const $SCF_WORD = 0x2 Global Const $SCF_ALL = 0x4 Global Const $SCF_USEUIRULES = 0x8 Global Const $SCF_ASSOCIATEFONT = 0x10 Global Const $SCF_NOKBUPDATE = 0x20 ; RichEdit Messages Global Const $EM_AUTOURLDETECT = ($WM_USER + 91) Global Const $EM_CANPASTE = ($WM_USER + 50) Global Const $EM_CANREDO = ($WM_USER + 85) Global Const $EM_DISPLAYBAND = ($WM_USER + 51) Global Const $EM_EXGETSEL = ($WM_USER + 52) Global Const $EM_EXLIMITTEXT = ($WM_USER + 53) Global Const $EM_EXLINEFROMCHAR = ($WM_USER + 54) Global Const $EM_EXSETSEL = ($WM_USER + 55) Global Const $EM_FINDTEXT = ($WM_USER + 56) Global Const $EM_FINDTEXTEX = ($WM_USER + 79) Global Const $EM_FINDTEXTEXW = ($WM_USER + 124) Global Const $EM_FINDTEXTW = ($WM_USER + 123) Global Const $EM_FINDWORDBREAK = ($WM_USER + 76) Global Const $EM_FORMATRANGE = ($WM_USER + 57) Global Const $EM_GETAUTOURLDETECT = ($WM_USER + 92) Global Const $EM_GETBIDIOPTIONS = ($WM_USER + 201) Global Const $EM_GETCHARFORMAT = ($WM_USER + 58) Global Const $EM_GETEDITSTYLE = ($WM_USER + 205) Global Const $EM_GETEVENTMASK = ($WM_USER + 59) Global Const $EM_GETIMECOLOR = ($WM_USER + 105) Global Const $EM_GETIMECOMPMODE = ($WM_USER + 122) Global Const $EM_GETIMEMODEBIAS = ($WM_USER + 127) Global Const $EM_GETIMEOPTIONS = ($WM_USER + 107) Global Const $EM_GETLANGOPTIONS = ($WM_USER + 121) Global Const $EM_GETOPTIONS = ($WM_USER + 78) Global Const $EM_GETPARAFORMAT = ($WM_USER + 61) Global Const $EM_GETPUNCTUATION = ($WM_USER + 101) Global Const $EM_GETREDONAME = ($WM_USER + 87) Global Const $EM_GETSCROLLPOS = ($WM_USER + 221) Global Const $EM_GETSELTEXT = ($WM_USER + 62) Global Const $EM_GETTEXTEX = ($WM_USER + 94) Global Const $EM_GETTEXTLENGTHEX = ($WM_USER + 95) Global Const $EM_GETTEXTMODE = ($WM_USER + 90) Global Const $EM_GETTEXTRANGE = ($WM_USER + 75) Global Const $EM_GETTYPOGRAPHYOPTIONS = ($WM_USER + 203) Global Const $EM_GETUNDONAME = ($WM_USER + 86) Global Const $EM_GETWORDBREAKPROCEX = ($WM_USER + 80) Global Const $EM_GETWORDWRAPMODE = ($WM_USER + 103) Global Const $EM_GETZOOM = ($WM_USER + 224) Global Const $EM_HIDESELECTION = ($WM_USER + 63) Global Const $EM_PASTESPECIAL = ($WM_USER + 64) Global Const $EM_RECONVERSION = ($WM_USER + 125) Global Const $EM_REDO = ($WM_USER + 84) Global Const $EM_REQUESTRESIZE = ($WM_USER + 65) Global Const $EM_SELECTIONTYPE = ($WM_USER + 66) Global Const $EM_SETBIDIOPTIONS = ($WM_USER + 200) Global Const $EM_SETBKGNDCOLOR = ($WM_USER + 67) Global Const $EM_SETCHARFORMAT = ($WM_USER + 68) Global Const $EM_SETEDITSTYLE = ($WM_USER + 204) Global Const $EM_SETEVENTMASK = ($WM_USER + 69) Global Const $EM_SETFONTSIZE = ($WM_USER + 223) Global Const $EM_SETIMECOLOR = ($WM_USER + 104) Global Const $EM_SETIMEMODEBIAS = ($WM_USER + 126) Global Const $EM_SETIMEOPTIONS = ($WM_USER + 106) Global Const $EM_SETLANGOPTIONS = ($WM_USER + 120) Global Const $EM_SETOLECALLBACK = ($WM_USER + 70) Global Const $EM_SETOPTIONS = ($WM_USER + 77) Global Const $EM_SETPALETTE = ($WM_USER + 93) Global Const $EM_SETPARAFORMAT = ($WM_USER + 71) Global Const $EM_SETPUNCTUATION = ($WM_USER + 100) Global Const $EM_SETSCROLLPOS = ($WM_USER + 222) Global Const $EM_SETTARGETDEVICE = ($WM_USER + 72) Global Const $EM_SETTEXTEX = ($WM_USER + 97) Global Const $EM_SETTEXTMODE = ($WM_USER + 89) Global Const $EM_SETTYPOGRAPHYOPTIONS = ($WM_USER + 202) Global Const $EM_SETUNDOLIMIT = ($WM_USER + 82) Global Const $EM_SETWORDBREAKPROCEX = ($WM_USER + 81) Global Const $EM_SETWORDWRAPMODE = ($WM_USER + 102) Global Const $EM_SETZOOM = ($WM_USER + 225) Global Const $EM_SHOWSCROLLBAR = ($WM_USER + 96) Global Const $EM_STOPGROUPTYPING = ($WM_USER + 88) Global Const $EM_STREAMIN = ($WM_USER + 73) Global Const $EM_STREAMOUT = ($WM_USER + 74) Global Const $EN_ALIGNLTR = 0X710 Global Const $EN_ALIGNRTL = 0X711 Global Const $EN_CORRECTTEXT = 0X705 Global Const $EN_DRAGDROPDONE = 0X70c Global Const $EN_DROPFILES = 0X703 Global Const $EN_IMECHANGE = 0X707 Global Const $EN_LINK = 0X70b Global Const $EN_MSGFILTER = 0X700 Global Const $EN_OBJECTPOSITIONS = 0X70a Global Const $EN_OLEOPFAILED = 0X709 Global Const $EN_PROTECTED = 0X704 Global Const $EN_REQUESTRESIZE = 0X701 Global Const $EN_SAVECLIPBOARD = 0X708 Global Const $EN_SELCHANGE = 0X702 Global Const $EN_STOPNOUNDO = 0X706 Global Const $ENM_CHANGE = 0x1 Global Const $ENM_CORRECTTEXT = 0x400000 Global Const $ENM_DRAGDROPDONE = 0x10 Global Const $ENM_DROPFILES = 0x100000 Global Const $ENM_IMECHANGE = 0x800000 Global Const $ENM_KEYEVENTS = 0x10000 Global Const $ENM_LINK = 0x4000000 Global Const $ENM_MOUSEEVENTS = 0x20000 Global Const $ENM_OBJECTPOSITIONS = 0x2000000 Global Const $ENM_PROTECTED = 0x200000 Global Const $ENM_REQUESTRESIZE = 0x40000 Global Const $ENM_SCROLL = 0x4 Global Const $ENM_SCROLLEVENTS = 0x8 Global Const $ENM_SELCHANGE = 0x80000 Global Const $ENM_UPDATE = 0x2 Global Const $ES_DISABLENOSCROLL = 0x2000 Global Const $ES_EX_NOCALLOLEINIT = 0x1000000 Global Const $ES_NOIME = 0x80000 Global Const $ES_SELFIME = 0x40000 Global Const $ES_SUNKEN = 0x4000 ;~ Global Const $ES_NUMBER = 0x2000 ;~ Global Const $ES_PASSWORD = 0x20 ;~ Global Const $ES_READONLY = 0x800 ;~ Global Const $ES_RIGHT = 0x2 ;~ Global Const $ES_WANTRETURN = 0x1000 Global Const $WM_LBUTTONDBLCLK = 0x203 Global Const $WM_LBUTTONDOWN = 0x201 ;Global Const $WM_LBUTTONUP = 0x202 ;Global Const $WM_MOUSEMOVE = 0x200 Global Const $WM_RBUTTONDBLCLK = 0x206 Global Const $WM_RBUTTONDOWN = 0x204 Global Const $WM_RBUTTONUP = 0x205 ;Global Const $WM_SETCURSOR = 0x20 ; structure formats Global Const $LF_FACESIZE = 32 Global Const $MAX_TAB_STOPS = 32 Global Const $NMHDR_fmt = "int;int;int" ;~ HWND hwndFrom; ;~ UINT idFrom; ;~ UINT code; Global Const $Rect_fmt = "int;int;int;int" Global Const $bidioptions_fmt = "uint;int;int" ;~ UINT cbSize; ;~ WORD wMask; ;~ WORD wEffects Global Const $charformat_fmt = "uint;dword;dword;int;int;int;byte;byte;char[" & $LF_FACESIZE & "]" ;~ UINT cbSize; ;~ DWORD dwMask; ;~ DWORD dwEffects; ;~ LONG yHeight; ;~ LONG yOffset; ;~ COLORREF crTextColor; ;~ BYTE bCharSet; ;~ BYTE bPitchAndFamily; ;~ TCHAR szFaceName[LF_FACESIZE]; Global Const $charformat2_fmt = "uint;dword;dword;int;int;int;byte;byte;char[" & $LF_FACESIZE & "];int;short;int;byte;byte;byte;byte" ;~ UINT cbSize; ;~ DWORD dwMask; ;~ DWORD dwEffects; ;~ LONG yHeight; ;~ LONG yOffset; ;~ COLORREF crTextColor; ;~ BYTE bCharSet; ;~ BYTE bPitchAndFamily; ;~ TCHAR szFaceName[LF_FACESIZE]; ;~ WORD wWeight; ;~ SHORT sSpacing; ;~ COLORREF crBackColor; ;~ LCID lcid; ;~ DWORD dwReserved; ;~ SHORT sStyle; ;~ WORD wKerning; ;~ BYTE bUnderlineType; ;~ BYTE bAnimation; ;~ BYTE bRevAuthor; ;~ BYTE bReserved1; Global Const $charrange_fmt = "int;int" ;~ LONG cpMin; ;~ LONG cpMax; Global Const $COMPCOLOR_fmt = "int;int;dword" ;~ COLORREF crText; ;~ COLORREF crBackground; ;~ DWORD dwEffects ;~ editstream { ;~ DWORD_PTR dwCookie; ;~ DWORD dwError; ;~ EDITSTREAMCALLBACK pfnCallback Global Const $encorrecttext_fmt = $NMHDR_fmt & ";" & $charrange_fmt & ";int" ;~ NMHDR nmhdr; ;~ CHARRANGE chrg; ;~ WORD seltyp; Global Const $endropfiles_fmt = $NMHDR_fmt & ";int;int;int" ;~ NMHDR nmhdr; ;~ HANDLE hDrop; ;~ LONG cp; ;~ BOOL fProtected Global Const $ENLINK_fmt = $NMHDR_fmt & ";uint;int;int;" & $charrange_fmt ;~ NMHDR nmhdr; ;~ UINT msg; ;~ WPARAM wParam; ;~ LPARAM lParam; ;~ CHARRANGE chrg Global Const $enlowfirtf_fmt = $NMHDR_fmt & ";ptr" ;~ NMHDR nmhdr; ;~ CHAR *szControl Global Const $ENOLEOPFAILED_fmt = $NMHDR_fmt & ";int;int;int" ;~ NMHDR nmhdr; ;~ LONG iob; ;~ LONG lOper; ;~ HRESULT hr; Global Const $enprotected_fmt = $NMHDR_fmt & ";uint;int;int;" & $charrange_fmt ;~ NMHDR nmhdr; ;~ UINT msg; ;~ WPARAM wParam; ;~ LPARAM lParam; ;~ CHARRANGE chrg Global Const $ENSAVECLIPBOARD_fmt = $NMHDR_fmt & ";int;int" ;~ NMHDR nmhdr; ;~ LONG cObjectCount; ;~ LONG cch; ;~ Global Const $findtext_fmt = $charrange_fmt & ";ptr" Global Const $findtext_fmt = $charrange_fmt & ";char[128]" ;~ CHARRANGE chrg; ;~ LPCTSTR lpstrText; Global Const $findtextex_ftm = $charrange_fmt & ";char[128];" & $charrange_fmt ;~ CHARRANGE chrg; ;~ LPCTSTR lpstrText; ;~ CHARRANGE chrgText Global Const $formatrange_fmt = "int;int;" & $Rect_fmt & ";" & $Rect_fmt & ";" & $charrange_fmt ;~ HDC hdc; ;~ HDC hdcTarget; ;~ RECT rc; ;~ RECT rcPage; ;~ CHARRANGE chrg Global Const $gettextex_fmt = "dword;dword;uint;char;int" ;~ DWORD cb; ;~ DWORD flags; ;~ UINT codepage; ;~ LPCSTR lpDefaultChar; ;~ LPBOOL lpUsedDefChar Global Const $gettextlengthex_fmt = "dword;uint" ;~ DWORD flags; ;~ UINT codepage; ;~ tagHyphenateInfo { ;~ SHORT cbSize; ;~ SHORT dxHyphenateZone; ;~ PFNHYPHENATEPROC pfnHyphenate Global Const $tagKHYPH_fmt = "int;int;int;int;int;int;int" ;~ khyphNil, ;~ khyphNormal, ;~ khyphAddBefore, ;~ khyphChangeBefore, ;~ khyphDeleteBefore, ;~ khyphChangeAfter, ;~ khyphDelAndChange Global Const $hyphresult_fmt = $tagKHYPH_fmt & ";int;char" ;~ KHYPH khyph; ;~ LONG ichHyph; ;~ WCHAR chHyph Global Const $imecomptext_fmt = "int;dword" ;~ LONG cb; ;~ DWORD flags; Global Const $msgfilter_fmt = $NMHDR_fmt & ";uint;int;int" ;~ NMHDR nmhdr; ;~ UINT msg; ;~ WPARAM wParam; ;~ LPARAM lParam Global Const $objectpositions_fmt = $NMHDR_fmt & ";int;int" ;~ NMHDR nmhdr; ;~ LONG cObjectCount; ;~ LONG *pcpPositions Global Const $paraformat_fmt = "uint;dword;int;int;int;int;int;int;short;int[" & $MAX_TAB_STOPS & "]" ;~ UINT cbSize; ;~ DWORD dwMask; ;~ WORD wNumbering; ;~ WORD wReserved; ;~ LONG dxStartIndent; ;~ LONG dxRightIndent; ;~ LONG dxOffset; ;~ WORD wAlignment; ;~ SHORT cTabCount; ;~ LONG rgxTabs[MAX_TAB_STOPS]; Global Const $paraformat_fmt2 = "uint;dword;int;int;int;int;int;int;short;int;int;int;int;short;byte;byte;int;int;int;int;int;int ;int;int" ;~ UINT cbSize; ;~ DWORD dwMask; ;~ WORD wNumbering; ;~ WORD wEffects; ;~ LONG dxStartIndent; ;~ LONG dxRightIndent; ;~ LONG dxOffset; ;~ WORD wAlignment; ;~ SHORT cTabCount; ;~ LONG rgxTabs[MAX_TAB_STOPS]; ;~ LONG dySpaceBefore; ;~ LONG dySpaceAfter; ;~ LONG dyLineSpacing; ;~ SHORT sStyle; ;~ BYTE bLineSpacingRule; ;~ BYTE bOutlineLevel; ;~ WORD wShadingWeight; ;~ WORD wShadingStyle; ;~ WORD wNumberingStart; ;~ WORD wNumberingStyle; ;~ WORD wNumberingTab; ;~ WORD wBorderSpace; ;~ WORD wBorderWidth; ;~ WORD wBorders; Global Const $punctuation_fmt = "uint;ptr" ;~ UINT iSize; ;~ LPSTR szPunctuation ;~ Global $reobject_fmt = "dword;int;int; { ;~ DWORD cbStruct; ;~ LONG cp; ;~ CLSID clsid; ;~ LPOLEOBJECT poleobj; ;~ LPSTORAGE pstg; ;~ LPOLECLIENTSITE polesite; ;~ SIZEL sizel; ;~ DWORD dvaspect; ;~ DWORD dwFlags; ;~ DWORD dwUser Global Const $repastespecial_fmt = "dword;dword" ;~ DWORD dwAspect; ;~ DWORD_PTR dwParam Global Const $reqresize_fmt = $NMHDR_fmt & ";" & $Rect_fmt ;~ NMHDR nmhdr; ;~ RECT rc; Global Const $selchange_fmt = $NMHDR_fmt & ";" & $charrange_fmt & ";int" ;~ NMHDR nmhdr; ;~ CHARRANGE chrg; ;~ WORD seltyp; Global Const $settextex_fmt = "dword;uint" ;~ DWORD flags; ;~ UINT codepage Global Const $textrange_fmt = $charrange_fmt & ";ptr" ;~ CHARRANGE chrg; ;~ LPSTR lpstrText Global Const $tagLOGFONT_fmt = "int;int;int;int;int;byte;byte;byte;byte;byte;byte;byte;byte;char[" & $LF_FACESIZE & "]" ;~ LONG lfHeight; ;~ LONG lfWidth; ;~ LONG lfEscapement; ;~ LONG lfOrientation; ;~ LONG lfWeight; ;~ BYTE lfItalic; ;~ BYTE lfUnderline; ;~ BYTE lfStrikeOut; ;~ BYTE lfCharSet; ;~ BYTE lfOutPrecision; ;~ BYTE lfClipPrecision; ;~ BYTE lfQuality; ;~ BYTE lfPitchAndFamily; ;~ TCHAR lfFaceName[LF_FACESIZE]; Global $h_lib ; Cleanup Cheers, Brett Edited June 6, 2008 by Bert 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!
Madza91 Posted June 20, 2008 Posted June 20, 2008 Hi, i downloaded GuiRichEdit.au3 and RichEdit_Example.au3, but i get 37 errors, why don't work?...C:\Documents and Settings\MyUserName\Desktop\GuiRichEdit.au3(166,44) : ERROR: $WM_USER: undeclared global variable.Global Const $EM_AUTOURLDETECT = ($WM_USER +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^C:\Documents and Settings\Nemanja\Desktop\RichEdit_Example.au3 - 37 error(s), 11 warning(s) [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)
BrettF Posted June 21, 2008 Posted June 21, 2008 Hi, i downloaded GuiRichEdit.au3 and RichEdit_Example.au3, but i get 37 errors, why don't work?Look at my previous post. 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!
Madza91 Posted July 12, 2008 Posted July 12, 2008 Hi again...How to set different color in 1 line ? [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)
Kip Posted August 3, 2008 Posted August 3, 2008 Could someone provide an example how to colorize words? MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
Kip Posted August 5, 2008 Posted August 5, 2008 bump MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
Michel Claveau Posted August 5, 2008 Posted August 5, 2008 Hi! An example, extract from Betapad (with RICHTEXT.RichTextCtrl) : expandcollapse popup#include <GUIConstants.au3> #include <String.au3> Global $DocEd1 = ObjCreate("RICHTEXT.RichTextCtrl") If Not IsObj($DocEd1) Then MsgBox(262144 + 16, "Error", "Loss RICHTEXT.RichTextCtrl object.") Exit EndIf $BetaPad = GUICreate("", 735, 600, -1, -1) $test= GUICtrlCreateButton("TEST",0,0,100,22) $tst2= GUICtrlCreateButton("TEST2",100,0,100,22) $tst3= GUICtrlCreateButton("TEST3",200,0,100,22) $GUIActiveX = GUICtrlCreateObj($DocEd1, 1, 25,735,575) GUICtrlSetPos(-1, 0, 25, 735, 575) With $DocEd1 .OLEObjects() .OLEDrag() .OLEDropMode = 2 .ScrollBars() .AutoVerbMenu = 1 .MultiLine() .SelStart = 0 .SelFontName = "Arial Narrow" .SelFontSize = 12 .HideSelection = False .BackColor = 0xFFFFFF EndWith GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $test #cs $temp = $DocEd1.SelRTF MsgBox(0,45,$temp,5) $temp = $DocEd1.SelText MsgBox(0,45,$temp,5) #ce $DocEd1.SelText = "AAAAAAAAAAAAAAAAAAAA"& @CRLF $DocEd1.SelFontName = "Comic Sans MS" $DocEd1.SelFontSize = 24 $DocEd1.SelColor = ccolor(0,0,255) ;$DocEd1.BackColor = 65535 $DocEd1.SelBold $DocEd1.SelText = "BBBBBBBBBBBBBBBBBBB"& @CRLF $DocEd1.SelFontName = "Arial" $DocEd1.SelFontSize = 16 $DocEd1.SelColor = ccolor(255,0,0) $DocEd1.SelText = "CCCCCCCCCCCCCCCCCCCCCçê"& @CRLF Case $tst2 $DocEd1.SaveFile("C:\rtf.rtf") Case $tst3 $DocEd1.loadFile("C:\rtf.rtf") Case $GUI_EVENT_CLOSE ExitLoop EndSwitch sleep(12) WEnd Func ccolor($b,$v,$r) ;255 couleur max (+ clair); 0 + foncé Return $r*256*256 + $v*256 + $b EndFunc Click on the button with Label "TEST"
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