Thatsgreat2345 Posted January 15, 2006 Posted January 15, 2006 (edited) well im working on some homework and i have to have atleast 100 words and since im typing it all on one document i cant check to see how many for each i have so is there any way to make like a GUI with an edit box , i can just paste the text in press go and it will tell me how many words i have, dont have autoit installed so i cant look at the help file Edited January 15, 2006 by thatsgreat2345
Oxin8 Posted January 15, 2006 Posted January 15, 2006 maybe this will work instead? http://www.javascriptkit.com/script/script2/countwords.shtml ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus
GrungeRocker Posted January 15, 2006 Posted January 15, 2006 maybe try to do it with stringsplit, an then check the arry oO [font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font]
Thatsgreat2345 Posted January 15, 2006 Author Posted January 15, 2006 (edited) THANKS SMOKEN just IMed him and he helped me Edited January 15, 2006 by thatsgreat2345
Moderators SmOke_N Posted January 15, 2006 Moderators Posted January 15, 2006 maybe try to do it with stringsplit, an then check the arry oO If you did a StringSplit() why would you check the array? Func FindWords($s_Text) Return Ubound(StringSplit(StringStripWS($s_Text, 7), ' ') - 1 EndFunc Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Thatsgreat2345 Posted January 15, 2006 Author Posted January 15, 2006 (edited) | v yes thanks SMOKEN $MainGui = GuiCreate('Test GUI', 215, 160) $edit = GUICtrlCreateEdit('', 10, 10, 195, 110) $start = GUICtrlCreateButton('Convert', 80, 120, 60, 30) $sclear = GUICtrlCreateButton('clear', 80, 150, 60, 30) GUISetState() While 1 $MainMsg = GUIGetMsg() Select Case $MainMsg = - 3 Exit Case $MainMsg = $start $TotalWords = CountWords(GUICtrlRead($edit)) MsgBox(0, '', $TotalWords) EndSelect WEnd Func CountWords($s_All_Text) Local $SplitSpaces = StringSplit(StringStripWS($s_All_Text, 7), ' ') Return UBound($SplitSpaces) - 1 EndFunc Edited January 15, 2006 by thatsgreat2345
GrungeRocker Posted January 15, 2006 Posted January 15, 2006 If you did a StringSplit() why would you check the array? Func FindWords($s_Text) Return Ubound(StringSplit(StringStripWS($s_Text, 7), ' ') - 1 EndFunc i meant it that way ^.^' [font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font]
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