magician13134 Posted January 8, 2007 Share Posted January 8, 2007 Ok, I'm working on a program somewhere between Notepad and Word, it'll probably end up similar to Wordpad, but I need some help. I'm stuck on a few things. First is 'Fix captilization' it corrects your capital letters, but when it replaces them, the only way I could think of was to have it select that letter and then send the keystroke of the correct letter. So the problem with that is, it may leave your cursor in an odd place on the page... Here's that code: Func CapCheck() $SentenceStart = 1 $text = StringSplit(ControlGetText($mainWnd, "", $TextBox), "") For $i = 1 to $text[0] If $text[$i] = '.' or $text[$i] = '!' or $text[$i] = '?' Then $SentenceStart = 1 If $text[$i] <> " " and $text[$i] <> "." and $text[$i] <> "!" and $text[$i] <> "?" Then If $SentenceStart = 1 Then $SentenceStart = 0 If StringIsLower($text[$i]) Then _GUICtrlEditSetSel($TextBox, $i-1, $i) Send(StringUpper($text[$i])) EndIf EndIf EndIf Next EndFunc I can't use the replace function or else things like: "well, crap, this isn't working well" would correct both 'well's, not just one (or correct the wrong one). Any ideas? That's all I'll ask for now, I'll try to fix the other minor issues until someone helps me with this. Thanks! Visit Magic Soft Inc. for some of my software Link to comment Share on other sites More sharing options...
James Posted January 8, 2007 Share Posted January 8, 2007 _Kurt is working on a spellchecker, which will deal with it. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
magician13134 Posted January 9, 2007 Author Share Posted January 9, 2007 That's not exactly what I had in mind. I hoped to write this all myself. I just wondered if there was a function to replace a specified character without moving the cursor. Visit Magic Soft Inc. for some of my software Link to comment Share on other sites More sharing options...
BrettF Posted January 9, 2007 Share Posted January 9, 2007 What about seeing if it was after a full stop? or on a new line? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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