ludocus Posted March 30, 2008 Share Posted March 30, 2008 (edited) $gui = GUICreate("Easy Editor", 613, 424, 193, 125) $Edit1 = GUICtrlCreateEdit("", 0, 0, 615, 421) $read = GUICtrlRead ( $Edit1 ) for instence: I type: hello in $Edit1 now I want to find the string hello and select it if I press a button. Finding the string would be: If StringInStr ( $read, 'hello' ) then .... I don't know how to select the string? (you know dragging your mouse over it and making it blue) I want the program to do that.. (select a string) Edited March 30, 2008 by ludocus Link to comment Share on other sites More sharing options...
monoceres Posted March 30, 2008 Share Posted March 30, 2008 Found this in the helpfile: #Include <GuiEdit.au3> _GUICtrlEdit_SetSel($hWnd, $iStart, $iEnd) Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
ludocus Posted March 30, 2008 Author Share Posted March 30, 2008 GREAT!!!! THANK YOU VERY MUCH!!!!!!!!! Link to comment Share on other sites More sharing options...
ludocus Posted March 30, 2008 Author Share Posted March 30, 2008 (edited) wait.. I am trying this now.. but I don't really know how to use it.. A little more help please? -edit I am making a text editor and I want: A string find select func a: Select all func Edited March 30, 2008 by ludocus Link to comment Share on other sites More sharing options...
Kip Posted March 30, 2008 Share Posted March 30, 2008 but I don't really now how to use it..its: Know, not now example: #include <GUIConstants.au3> #include <GuiEdit.au3> $EditString = StringFormat("Hallo ludo \r\n\r\ntekstjes, tekst\r\nVinkeveen rocks :P") $SearchString = "Vinkeveen rocks" #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 633, 447, 193, 125) $hEdit = GUICtrlCreateEdit("", 48, 48, 545, 353) $hEdit = GUICtrlGetHandle($hEdit) GUICtrlSetData(-1, $EditString) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $Start = StringInStr($EditString,$SearchString)-1 $Length = StringLen($SearchString) _GUICtrlEdit_SetSel ($hEdit, $Start, $Start+$Length) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
ludocus Posted March 30, 2008 Author Share Posted March 30, 2008 thnx kip 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