magician13134 0 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! Hide magician13134's signature Hide all signatures Visit Magic Soft Inc. for some of my software Share this post Link to post Share on other sites
James 376 Posted January 8, 2007 _Kurt is working on a spellchecker, which will deal with it. Hide James's signature Hide all signatures Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Share this post Link to post Share on other sites
magician13134 0 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. Hide magician13134's signature Hide all signatures Visit Magic Soft Inc. for some of my software Share this post Link to post Share on other sites
BrettF 28 Posted January 9, 2007 What about seeing if it was after a full stop? or on a new line? Hide BrettF's signature Hide all signatures 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! Share this post Link to post Share on other sites