Geirolz Posted April 8, 2011 Posted April 8, 2011 (edited) Hello everyone I want to create a syntax for an input in my Sw I wish if I write the word BIND colors BIND of blue for example I'm really desperate and I'm looking for weeks for the network but have not found anything thank you very much Edited April 8, 2011 by Geirolz
nitekram Posted April 8, 2011 Posted April 8, 2011 Hello everyone I want to create a syntax for an input in my SwI wish if I write the word BIND colors BIND of blue for exampleI'm really desperate and I'm looking for weeks for the network but have not found anythingthank you very muchnot really sure what you are asking, but you could read the input and based upon what it says change the color of the background?$read = guictrlread($yourinput)If $read = 'BIND' Then GUICtrlSetBkColor($yourinput, 0x00ff00) ; changes the background to green (could not find blue fast enough) 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
somdcomputerguy Posted April 8, 2011 Posted April 8, 2011 0x0000FF -> blue - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
nitekram Posted April 8, 2011 Posted April 8, 2011 i don't HighLight all input but only "Bind"Look up the function - GUICtrlSetColor() from the help file, should be what you want. 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
smartee Posted April 8, 2011 Posted April 8, 2011 Interesting, try thisexpandcollapse popup#include <GuiRichEdit.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Color.au3> $hGui = GUICreate("Example (" & @ScriptName & ")", 320, 350, -1, -1) $hRichEdit = _GUICtrlRichEdit_Create($hGui, "", 10, 10, 300, 330, _ BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) GUISetState() _GUICtrlRichEdit_SetText($hRichEdit, "The bind function associates a local address with a socket.") _highlightWords() $updateWords = _GUICtrlRichEdit_GetText($hRichEdit) While True $iMsg = GUIGetMsg() Select Case $iMsg = $GUI_EVENT_CLOSE GUIDelete() Exit EndSelect $updateWords = _update($updateWords) WEnd Func _highlightWords($defcolor = 0x000000) _GUICtrlRichEdit_SetCharColor($hRichEdit, $defcolor) _highlight("bind", 0xff0000) _highlight("socket", 0x0000ff) EndFunc ;==>_highlightWords Func _update($last) $new = _GUICtrlRichEdit_GetText($hRichEdit) If ($new <> $last) Then _highlightWords() Return $new EndIf Return $last EndFunc ;==>_update Func _highlight($word, $color) $prevsel = _GUICtrlRichEdit_GetSel($hRichEdit) $range = _GUICtrlRichEdit_FindTextInRange($hRichEdit, $word) While Not (@error) And ($range[0] <> -1) _GUICtrlRichEdit_SetSel($hRichEdit, $range[0], $range[1]) _GUICtrlRichEdit_SetCharColor($hRichEdit, $color) $range = _GUICtrlRichEdit_FindTextInRange($hRichEdit, $word, $range[1]) WEnd _GUICtrlRichEdit_SetSel($hRichEdit, $prevsel[0], $prevsel[1]) EndFunc ;==>_highlight
Geirolz Posted April 9, 2011 Author Posted April 9, 2011 u have the link for download GuiRichEdit.au3 ??? thanks
Geirolz Posted April 9, 2011 Author Posted April 9, 2011 can i create _GUICtrlRichEdit_Create in Tab ????
smartee Posted April 9, 2011 Posted April 9, 2011 Nice question, its not as straightforward as it should be, but there a few workarounds available if you search the forum.
Moderators Melba23 Posted April 9, 2011 Moderators Posted April 9, 2011 Geirolz,I recommend starting with the Tabs tutorial in the Wiki. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
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