Fossil Rock Posted August 9, 2006 Share Posted August 9, 2006 Is there a way, with AutoIt, to turn off word wrap in an edit control. The word wrap is screwing up my script output. Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
GaryFrost Posted August 10, 2006 Share Posted August 10, 2006 Is there a way, with AutoIt, to turn off word wrap in an edit control. The word wrap is screwing up my script output.Might get more help if you included a script. 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...
Fossil Rock Posted August 10, 2006 Author Share Posted August 10, 2006 What sort of script would you like? I've got msgbox scripts, counter scripts, pixelsearch scripts.... I don't need someone the fix my code I need to know if (and how) word wrap can be turned off. Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
Knight Posted August 10, 2006 Share Posted August 10, 2006 Word wrap in an autoit generated edit control? or a foreign programs edit control? Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 10, 2006 Share Posted August 10, 2006 What sort of script would you like? I've got msgbox scripts, counter scripts, pixelsearch scripts.... I don't need someone the fix my code I need to know if (and how) word wrap can be turned off.If it's an AutoIT generated Edit box that gives you the problem, post the shortest demo script possible that demonstrates the problem. Someone will find the fix very soon afterwards. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Fossil Rock Posted August 10, 2006 Author Share Posted August 10, 2006 The word wrap, or lack thereof, is in another programs edit control. There doesn't seem to be anything wrong with my script other than the fact that the text that my script gets from the outside app gets read in as 3 lines, when in actuality it is 1 line (word wrapped). When I force the other apps edit control to be very wide it will no longer word wrap (for obvious reasons). Making this adjustment doesn't seem to be the answer just because it will funky up the other app (it's do-able I suppose, but not preferred). Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 10, 2006 Share Posted August 10, 2006 (edited) The word wrap, or lack thereof, is in another programs edit control. There doesn't seem to be anything wrong with my script other than the fact that the text that my script gets from the outside app gets read in as 3 lines, when in actuality it is 1 line (word wrapped). When I force the other apps edit control to be very wide it will no longer word wrap (for obvious reasons). Making this adjustment doesn't seem to be the answer just because it will funky up the other app (it's do-able I suppose, but not preferred). Then perhaps just removing the line breaks after reading the control would be easier: $sText = ControlGetText("Window Title", "Window Text", "Edit1") $sText = StringReplace($sText, @CR, "") $sText = StringReplace($sText, @LF, "") MsgBox(64, "Results", "Text with line breaks removed: " & $sText Edited August 10, 2006 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
GaryFrost Posted August 10, 2006 Share Posted August 10, 2006 being your ruluctant to give all the information to help you, I'll do the same DllCall("user32.dll", "none", "SendMessage", "hwnd", $h_edit, "int", 0xC8, "int", 0, "int", 0) 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...
Knight Posted August 10, 2006 Share Posted August 10, 2006 (edited) I am not 100% sure, but if the word wrap is kept then there might be CR and LF in the string. So assuming you can read the info out of the edit control this should work. Where $String is equal to the string from the edit control. $String = StringReplace($String, Chr(10), "") $String = StringReplace($String, Chr(13), "") EDIT: Ahh got beat to it.. I type too slow lol. Edited August 10, 2006 by Knight 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