strate Posted January 19, 2006 Share Posted January 19, 2006 When typing in scite it will create a drop down of functions that match the spelling of the current word, how was this made? Is this something that can be created with autoit? INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
greenmachine Posted January 19, 2006 Share Posted January 19, 2006 I believe it has to do with the api (and possibly Lua, but I'm just guessing there). When I find more info I'll let you know. Link to comment Share on other sites More sharing options...
strate Posted January 19, 2006 Author Share Posted January 19, 2006 FYI: I have a list of the 3000 most mispelled words in the english language and wanna make a spell checker with it. INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
seandisanti Posted January 19, 2006 Share Posted January 19, 2006 (edited) FYI: I have a list of the 3000 most mispelled words in the english language and wanna make a spell checker with it.i was actually asked to implement a spell checker today for this stupid encoder/decoder i made for this couple at work. I just used the spellchecker from office, i'll put it in a quote so i can color the spellcheck test vs. the rest of the code. to run the code, beta is required, as is MSWord. If you have a diff office product (just excel, outlook, or whatever) you can just change the Word.application to Excel.application etc... #include<guiconstants.au3> #include<array.au3> Opt("GUIOnEventMode",1) Opt("GUICloseOnESC",0) HotKeySet("{ESC}","HIDE") If FileExists(@MyDocumentsDir & "\ep") Then Global $pass = FileReadLine(@MyDocumentsDir & "\ep") Else Global $pass = InputBox("Password Not Saved","Enter password you would like to use to decrypt text") FileWriteLine(@MyDocumentsDir & "\ep",$pass) EndIf Global $gui = GUICreate("blah",300,300) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") Global $tb = GUICtrlCreateEdit("",10,10,280,250,BitOR($ES_MULTILINE,$ES_WANTRETURN,$ES_AUTOVSCROLL)) Global $btn = GUICtrlCreateButton(".",10,270,280) GUICtrlSetOnEvent($btn,"encdec") GUISetState() Global $ed = 0 while 1 sleep(100) WEnd Func CloseClicked() Exit EndFunc Func encdec() Select Case $ed = 1 decfunc() $ed = 0 case Else encfunc() $ed = 1 EndSelect EndFunc Func encfunc() $contents = GUICtrlRead($tb) $ToSC = StringSplit($contents," ") $oWord = ObjCreate("Word.application") For $WordCounter = 1 to $ToSC[0] If Not $oWord.CheckSpelling($ToSC[$WordCounter]) Then $newword = InputBox("Illiterate Bastard",$ToSC[$WordCounter] & " is apparently something you just pulled out of your ass. Please type in what you meant.",$ToSC[$WordCounter]) $ToSC[$WordCounter] = $newword EndIf Next $oWord.quit $contents = _ArrayToString($ToSC," ",1,UBound($ToSC)) Global $new = "" For $a = 1 to StringLen($contents) $power = 4 $number = asc(StringMid($contents,$a,1)) While $number > 0 If $number >= 3^$power Then If $power < 0 Then ExitLoop $new = $new & Floor($number/3^$power) $number = $number - (3 ^ $power * Floor($number/3^$power)) Else $new = $new & "0" EndIf If $number <= 3 ^ $power Then $power = $power - 1 WEnd While mod(StringLen($new),5) $new = $new & "0" WEnd Next ControlSetText("blah","",$tb,$new) EndFunc Func decfunc() $try = "" While $try <> $pass $try = InputBox("Password Required","Please enter password to decrypt text","********","*") WEnd $msg = "" $contents = GUICtrlRead($tb) While StringLen($contents) > 0 $number = StringLeft($contents,5) $tmp = 0 for $y = 0 to 5 $tmp = $tmp + Int(StringMid($number,stringlen($number)-$y,1))*3^$y Next $msg = $msg & chr($tmp) $contents = StringRight($contents,StringLen($contents)-5) WEnd ControlSetText("blah","",$tb,$msg) EndFunc Func HIDE() If $ed = 0 Then encdec() EndIf WinSetState("blah","",@SW_MINIMIZE) EndFunc Edited January 19, 2006 by cameronsdad Link to comment Share on other sites More sharing options...
strate Posted January 19, 2006 Author Share Posted January 19, 2006 i was actually asked to implement a spell checker today for this stupid encoder/decoder i made for this couple at work. I just used the spellchecker from office, i'll put it in a quote so i can color the spellcheck test vs. the rest of the code. to run the code, beta is required, as is MSWord. If you have a diff office product (just excel, outlook, or whatever) you can just change the Word.application to Excel.application etc...Would this work in the same fasion as Scite? I'd like to use it all day while here at work. INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 19, 2006 Moderators Share Posted January 19, 2006 FYI:I have a list of the 3000 most mispelled words in the english language and wanna make a spell checker with it.I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg The phaonmneal pweor of the hmuan mnid Aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny iprmoatnt tihng is taht the frist and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it wouthit a porbelm Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Amzanig huh? yaeh and I awlyas thought slpeling was ipmorantt! 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. Link to comment Share on other sites More sharing options...
seandisanti Posted January 20, 2006 Share Posted January 20, 2006 Would this work in the same fasion as Scite? I'd like to use it all day while here at work.not the drop down capability, that would be tougher for sure. What program are you wanting to add the feature to? you couldn't just do it for ALL programs, because there wouldn't always be controls that could be interacted with the same way. If you want, i can make you something for word, if you attach your 3k word list (i'm assuming it's a list of the correct spelling) i can make it so that if you're using word, you'll get a list of some fashion, based on the word that you're currently typing, from that list... Link to comment Share on other sites More sharing options...
strate Posted January 20, 2006 Author Share Posted January 20, 2006 not the drop down capability, that would be tougher for sure. What program are you wanting to add the feature to? you couldn't just do it for ALL programs, because there wouldn't always be controls that could be interacted with the same way. If you want, i can make you something for word, if you attach your 3k word list (i'm assuming it's a list of the correct spelling) i can make it so that if you're using word, you'll get a list of some fashion, based on the word that you're currently typing, from that list...Actually I want it to check against all user input thru the keyboard. I've been thinking about it for a while and was thinking about it logging key punches then putting together the string between spaces, make sense? INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
seandisanti Posted January 20, 2006 Share Posted January 20, 2006 Actually I want it to check against all user input thru the keyboard. I've been thinking about it for a while and was thinking about it logging key punches then putting together the string between spaces, make sense?yes, and it is possible to do it that way, BUT, the potential for abuse (keyloggers) is too great for me to help with that approach. That is not the only way to do what you want to do, and personally i don't think it's even the best way. If you attach your list of words, i can make you a solution that you can try to adapt if you like. Link to comment Share on other sites More sharing options...
strate Posted January 20, 2006 Author Share Posted January 20, 2006 (edited) yes, and it is possible to do it that way, BUT, the potential for abuse (keyloggers) is too great for me to help with that approach. That is not the only way to do what you want to do, and personally i don't think it's even the best way. If you attach your list of words, i can make you a solution that you can try to adapt if you like.Yeah I will. I always have a hard time attaching so just a min.EDIT: I gave the one with just a thousand. It would be annoying for it to pop up with every word. I agree with the keylogger statement. I assumed that there were better ways but that was the first one that came to mind to see if I'd like it. Edited January 20, 2006 by strate INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... 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