WFC Posted February 19, 2006 Share Posted February 19, 2006 Is there any way to do a Find/Replace in an Edit control? If so I haven't found it. Also, is there any way to get a Printer Dialog/Setup? The print function in AutoIt appears to use the NotePad print function since I can set up a printer there and my program will use it. It would be nice if I could set it up without going through Notepad. Thirdly, I downloaded a script and attempted to compile it and got the error: GUICtrlCreateActiveX(): undefined function. Is that function still under developement? I am using the lasted beta. WFC Link to comment Share on other sites More sharing options...
Valuater Posted February 19, 2006 Share Posted February 19, 2006 yes guictrlread() ; read the edit stringinstring() ; find your search stringreplace() ; replace that string guictrlsetdata() ; replace the data in the edit 8) Link to comment Share on other sites More sharing options...
WFC Posted February 19, 2006 Author Share Posted February 19, 2006 yesguictrlread() ; read the editstringinstring() ; find your searchstringreplace() ; replace that stringguictrlsetdata() ; replace the data in the edit8)That will certainly replace the string. What I had in mind was a popup that would allow you to enter a search string and a replace string. When you hit OK it finds the text in the editor , highlights the string found and gives you the option of replacing it or search for the next instance of the search string. Even being able to search for the string, place the cursor on it and scroll to it would be nice.WFC Link to comment Share on other sites More sharing options...
Knight Posted February 20, 2006 Share Posted February 20, 2006 look up StringInStr Link to comment Share on other sites More sharing options...
Valuater Posted February 20, 2006 Share Posted February 20, 2006 look up StringInStri already told him thatlook at the previous posts8) Link to comment Share on other sites More sharing options...
Sokko Posted February 20, 2006 Share Posted February 20, 2006 The GuiEdit set of UDFs contains some functions that might help you out. Look in the help file section "User Defined Functions" and then "GuiEdit Management". In particular, _GUICtrlEditSetSel and _GUICtrlEditReplaceSel could be useful for a search/replace interface. Link to comment Share on other sites More sharing options...
Valuater Posted February 20, 2006 Share Posted February 20, 2006 The GuiEdit set of UDFs contains some functions that might help you out. Look in the help file section "User Defined Functions" and then "GuiEdit Management". In particular, _GUICtrlEditSetSel and _GUICtrlEditReplaceSel could be useful for a search/replace interface.doesnt that do a "Line" at a time??8) Link to comment Share on other sites More sharing options...
GaryFrost Posted February 20, 2006 Share Posted February 20, 2006 (edited) The GuiEdit set of UDFs contains some functions that might help you out. Look in the help file section "User Defined Functions" and then "GuiEdit Management". In particular, _GUICtrlEditSetSel and _GUICtrlEditReplaceSel could be useful for a search/replace interface. For what the user is wanting to do, it would be easier to create your own udf that does the functions that Valuator posted (might want to check your spelling on those functions tho). Edited February 20, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
GaryFrost Posted February 20, 2006 Share Posted February 20, 2006 see here http://www.autoitscript.com/forum/index.php?showtopic=21938 SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Sokko Posted February 20, 2006 Share Posted February 20, 2006 (edited) doesnt that do a "Line" at a time??I'm not entirely sure what you mean, but both of those functions deal with absolute character positions. I was thinking of doing a StringInStr on a GUICtrlRead and using the result in a _GUICtrlEditSetSel for the "search" part of the problem, then following it up with _GUICtrlEditReplaceSel for the "replace" part. This is all thought experiments, though, so it may or may not actually work the way I'm thinking it will.Of course, with Gafrost's handy UDF, the point is rather moot. Edited February 20, 2006 by Sokko 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