scriptkitty Posted January 13, 2005 Share Posted January 13, 2005 Ok, this script is based on a consept that I saw in an email a year or so ago. It showed a paragraph that mixed up all the letters in a word, but keeping the first and last in place. If you looked at it, it was a mess, but if you just read it, then it was perfectly readable. I found it amusing, and the other day I thought to see if this would work for normal paragraphs and not just the one that was shown. So, why not let Autoit do my test for me. This is just a fun script and should have a few bugs. Here is the script, judge for yourself. expandcollapse popup; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.0 ; Language: English ; Platform: Win9x / NT ; Author: Scriptkitty ; ; Script Function: ; This is based on the thought that your mind will rearange words ; as long as the first and last letters are right, and all of the letters ; are in the word. Example, wrod if read fast would appear to be word as your mind ; will base it on context. Just for fun. Copy a bunch of text into the clipboard and run it. ; ; To deal with various puntuations I did a cheep mickeymouse fix for now. ; ---------------------------------------------------------------------------- $clip=clipget() ;$clip="Hello there fine folks" cheepfix1() $words=StringSplit($clip," ") $mixed="" for $i=1 to $words[0] $jumble=jumble($words[$i]) if $jumble=$words[$i] and stringlen($words[$i])>3 then $i=$i-1 ContinueLoop; this makes sure everything is mixed up. EndIf $mixed=$mixed & " " & $jumble Next cheepfix2() msgbox(1,"Mixed up version",$mixed) msgbox(1,"Normal version",$clip) func cheepfix1() $x=stringsplit(",'?!.></\@#$%&*()`{}[]","") for $i=1 to $x[0] $clip=StringReplace($clip,$x[$i]," "& $x[$i]) Next $clip=StringReplace($clip,@cr," "& @cr) $clip=StringReplace($clip,@lf,@lf & " ") EndFunc func cheepfix2() $x=stringsplit(",'?!.></\@#$%&*()`{}[]","") for $i=1 to $x[0] $jumble=StringReplace($jumble," " & $x[$i],$x[$i]) Next $jumble=StringReplace($jumble," "& @cr,@cr) EndFunc func jumble($_word) if stringlen($_word)<3 then return $_word $_letters=Stringsplit($_word,"") $_jumble=$_letters[1] $_used=" |" $_count=2 while $_count<$_letters[0] tooltip($_jumble,0,0) $ran=int(random(2,$_letters[0])) if stringinstr($_used,"|" & $ran & "|")=0 then $_count=$_count+1 $_used=$_used & $ran & "|" $_jumble=$_jumble & $_letters[$ran] EndIf WEnd return $_jumble & $_letters[$_letters[0]] EndFunc it does something like this: --------------------------- Mixed up version --------------------------- Ok, this sripct is based on a copsnet that I saw in an eiaml a year or so ago. It sewohd a parapgarh taht mxeid up all the lteters in a word , but kepneig the first and lsat in plcae. If you leokod at it, it was a mess, but if you jsut raed it, tehn it was peecrtlfy rdlbaeae. I funod it aismung, and the ohetr day I tgohhut to see if tihs wuold wrok for nmoral parahgarps and not jsut the one that was sowhn. So, why not let Aitout do my tset for me. Hree is the sprcit, jduge for yreulsof. AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Administrators Jon Posted January 13, 2005 Administrators Share Posted January 13, 2005 Ok, this script is based on a consept that I saw in an email a year or so ago. It showed a paragraph that mixed up all the letters in a word, but keeping the first and last in place. If you looked at it, it was a mess, but if you just read it, then it was perfectly readable.I found it amusing, and the other day I thought to see if this would work for normal paragraphs and not just the one that was shown. So, why not let Autoit do my test for me.This is just a fun script and should have a few bugs.Here is the script, judge for yourself.expandcollapse popup; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.0 ; Language: English ; Platform: Win9x / NT ; Author: Scriptkitty ; ; Script Function: ; This is based on the thought that your mind will rearange words ; as long as the first and last letters are right, and all of the letters ; are in the word. Example, wrod if read fast would appear to be word as your mind ; will base it on context. Just for fun. Copy a bunch of text into the clipboard and run it. ; ; To deal with various puntuations I did a cheep mickeymouse fix for now. ; ---------------------------------------------------------------------------- $clip=clipget() ;$clip="Hello there fine folks" cheepfix1() $words=StringSplit($clip," ") $mixed="" for $i=1 to $words[0] $jumble=jumble($words[$i]) if $jumble=$words[$i] and stringlen($words[$i])>3 then $i=$i-1 ContinueLoop; this makes sure everything is mixed up. EndIf $mixed=$mixed & " " & $jumble Next cheepfix2() msgbox(1,"Mixed up version",$mixed) msgbox(1,"Normal version",$clip) func cheepfix1() $x=stringsplit(",'?!.></\@#$%&*()`{}[]","") for $i=1 to $x[0] $clip=StringReplace($clip,$x[$i]," "& $x[$i]) Next $clip=StringReplace($clip,@cr," "& @cr) $clip=StringReplace($clip,@lf,@lf & " ") EndFunc func cheepfix2() $x=stringsplit(",'?!.></\@#$%&*()`{}[]","") for $i=1 to $x[0] $jumble=StringReplace($jumble," " & $x[$i],$x[$i]) Next $jumble=StringReplace($jumble," "& @cr,@cr) EndFunc func jumble($_word) if stringlen($_word)<3 then return $_word $_letters=Stringsplit($_word,"") $_jumble=$_letters[1] $_used=" |" $_count=2 while $_count<$_letters[0] tooltip($_jumble,0,0) $ran=int(random(2,$_letters[0])) if stringinstr($_used,"|" & $ran & "|")=0 then $_count=$_count+1 $_used=$_used & $ran & "|" $_jumble=$_jumble & $_letters[$ran] EndIf WEnd return $_jumble & $_letters[$_letters[0]] EndFuncit does something like this:---------------------------Mixed up version---------------------------Ok, this sripct is based on a copsnet that I saw in an eiaml a year or so ago. It sewohd a parapgarh taht mxeid up all the lteters in a word , but kepneig the first and lsat in plcae. If you leokod at it, it was a mess, but if you jsut raed it, tehn it was peecrtlfy rdlbaeae.I funod it aismung, and the ohetr day I tgohhut to see if tihs wuold wrok for nmoral parahgarps and not jsut the one that was sowhn. So, why not let Aitout do my tset for me.Hree is the sprcit, jduge for yreulsof.Cool, i remember that news article. Brains are funny. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
killaz219 Posted January 13, 2005 Share Posted January 13, 2005 A lot of the words come out the same, maybe you can write in a checker that will make sure they're different? Link to comment Share on other sites More sharing options...
herewasplato Posted January 13, 2005 Share Posted January 13, 2005 It goes a bit crazy with this in the clipboard:Cassini crossed Saturn's rings without mishap in June 2004The "2004" seems to break it... but thanks for the fun...http://www.cnn.com/2005/TECH/space/01/13/h...itan/index.html [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
herewasplato Posted January 13, 2005 Share Posted January 13, 2005 ...and another thing... my mind did not work so well with this: As the largest and most sophisticated interplanetary vehicle ever launched [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
scriptkitty Posted January 13, 2005 Author Share Posted January 13, 2005 ok, I found a bug that keeps the check for a non mixed up word looping so here is a slight fix: expandcollapse popup; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.0 ; Language: English ; Platform: Win9x / NT ; Author: Scriptkitty ; ; Script Function: ; This is based on the thought that your mind will rearange words ; as long as the first and last letters are right, and all of the letters ; are in the word. Example, wrod if read fast would appear to be word as your mind ; will base it on context. Just for fun. Copy a bunch of text into the clipboard and run it. ; ; To deal with various puntuations I did a cheep mickeymouse fix for now. ; ---------------------------------------------------------------------------- $clip=clipget() ;$clip="Hello there fine folks" cheepfix1() $words=StringSplit($clip," ") $mixed="" $err=0 for $i=1 to $words[0] $jumble=jumble($words[$i]) if $jumble=$words[$i] and stringlen($words[$i])>3 and $err<3 then $i=$i-1 $err=$err+1 ContinueLoop; this makes sure everything is mixed up. with 3 tries EndIf $err=0 $mixed=$mixed & " " & $jumble Next cheepfix2() msgbox(1,"Mixed up version",$mixed) msgbox(1,"Normal version",$clip) func cheepfix1() $x=stringsplit(",'?!.></\@#$%&*()`{}[]","") for $i=1 to $x[0] $clip=StringReplace($clip,$x[$i]," "& $x[$i]) Next $clip=StringReplace($clip,@cr," "& @cr) $clip=StringReplace($clip,@lf,@lf & " ") EndFunc func cheepfix2() $x=stringsplit(",'?!.></\@#$%&*()`{}[]","") for $i=1 to $x[0] $jumble=StringReplace($jumble," " & $x[$i],$x[$i]) Next $jumble=StringReplace($jumble," "& @cr,@cr) EndFunc func jumble($_word) if stringlen($_word)<3 then return $_word $_letters=Stringsplit($_word,"") $_jumble=$_letters[1] $_used=" |" $_count=2 while $_count<$_letters[0] $ran=int(random(2,$_letters[0])) if stringinstr($_used,"|" & $ran & "|")=0 then $_count=$_count+1 $_used=$_used & $ran & "|" $_jumble=$_jumble & $_letters[$ran] EndIf WEnd return $_jumble & $_letters[$_letters[0]] EndFunc AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Lazycat Posted January 13, 2005 Share Posted January 13, 2005 Nice! Interesting, this remain enough readable even with non-native language, if you well know mixed words. If I'm remember right, this effect is using in speed-reading methods. Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
herewasplato Posted January 13, 2005 Share Posted January 13, 2005 Great! It now works with "2004". Could you now fix my mind???? [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
killaz219 Posted January 13, 2005 Share Posted January 13, 2005 I don't think he's a brain surgeon. Link to comment Share on other sites More sharing options...
JSThePatriot Posted January 13, 2005 Share Posted January 13, 2005 HAHA I remember when that email was going around. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
ryeguy Posted January 13, 2005 Share Posted January 13, 2005 (edited) Nice script, but for the record, there are some sentences that you just can't read. I remember someone disproved it by showing that we can kind of predict what the next word will be, or what type or word it would be. By adding in not commonly used words, especially adjectives, the sentence wasn't easily readable. Anidroccg to crad cniyrrag lcitsiugnis planoissefors at an uemannd, utisreviny in Bsitirh Cibmuloa, and crartnoy to the duoibus cmials of the ueticnd rcraeseh, a slpmie, macinahcel ioisrevnn of ianretnl cretcarahs araepps sneiciffut to csufnoe the eadyrevy oekoolnr. Or: According to card carrying linguistics professionals at an unnamed, university in British Columbia and contrary to the dubious claims of the uncited research, a simple, mechanical inversion of internal characters appears sufficient to confuse the everyday onlooker. Edited January 13, 2005 by ryeguy Link to comment Share on other sites More sharing options...
Josbe Posted January 13, 2005 Share Posted January 13, 2005 Good coeabmck to froum, sricptktity AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
scriptkitty Posted January 13, 2005 Author Share Posted January 13, 2005 (edited) yea, basically 2004 would break it because I put a check to make sure the words were mixed up. 2004 would swich the first 0 with 0 and the word appeared to be the same, so it tried to mix it up again and again. The second version tries only a few times. If it was something important, I would use the jumble function to test to see if the randoms came out to be in order, ie: |2|3|4|5| etc, and if that occured it would re run it. Easy enough, but this is no production, just a fun example of things you can do with AutoIt. BTW @josbe, thanks, I got married and haven't been to the forums in a while. Nice to be back, although my code might have got a bit slacking Edited January 13, 2005 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
JSThePatriot Posted January 14, 2005 Share Posted January 14, 2005 yea, basically 2004 would break it because I put a check to make sure the words were mixed up. 2004 would swich the first 0 with 0 and the word appeared to be the same, so it tried to mix it up again and again. The second version tries only a few times. If it was something important, I would use the jumble function to test to see if the randoms came out to be in order, ie: |2|3|4|5| etc, and if that occured it would re run it. Easy enough, but this is no production, just a fun example of things you can do with AutoIt.BTW @josbe, thanks, I got married and haven't been to the forums in a while. Nice to be back, although my code might have got a bit slacking <{POST_SNAPBACK}>Congratulations on the marriage! I understand not being on the computer as much. It took me months to get back on the computer after I got married. We have been married 1 year and 5 months now.JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Josbe Posted January 14, 2005 Share Posted January 14, 2005 ...BTW @josbe, thanks, I got married and haven't been to the forums in a while. Nice to be back, although my code might have got a bit slacking <{POST_SNAPBACK}>Congrats. Two little bugs..a leading white space and the separated number.(Not all cases)Check this text:version 2.0The output is: verosin 2. 0 AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
scriptkitty Posted January 15, 2005 Author Share Posted January 15, 2005 (edited) Ok, I redid it, since folks seem to enjoy it. This version uses autoit to fine a word, and sends it to the mixup function. I added a simple if to test make sure there were no words that wouldn't get some mixing, and all puntuations should stay in tact. Also has a bit less code, and not so mickey moused. expandcollapse popup; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.0 ; Language: English ; Platform: Win9x / NT ; Author: Scriptkitty ; ; Script Function: ; This is based on the thought that your mind will rearange words ; as long as the first and last letters are right, and all of the letters ; are in the word. Example, wrod if read fast would appear to be word as your mind ; will base it on context. Just for fun. ; Copy a bunch of text into the clipboard and run it. ; ; To deal with various punctuations I did it character by character. ; ---------------------------------------------------------------------------- $clip=clipget() $mixed=jumble($clip) msgbox(1,"Mixed up version",$mixed) msgbox(1,"Normal version",$clip) func jumble($_text) $out="" $len=stringsplit($_text,"") $word="" for $i=1 to $len[0] if (asc($len[$i])>=65 and asc($len[$i])<=90) or_ (asc($len[$i])>=97 and asc($len[$i])<=122) Then; this checks to see if a letter. $word=$word & $len[$i] Else $test=mixup($word) & $len[$i] $out=$out& $test $word="" EndIf Next return $out EndFunc func mixup($_word) if stringlen($_word)<3 then return $_word $_letters=Stringsplit($_word,"") $_jumble=$_letters[1] $_used=" |" $_count=2 while $_count<$_letters[0] $ran=int(random(2,$_letters[0])) if stringinstr($_used,"|" & $ran & "|")=0 then $_count=$_count+1 $_used=$_used & $ran & "|" $_jumble=$_jumble & $_letters[$ran] EndIf if $_used=" |2|3|" Then; since random could be the normal order, I stop it $_letters=Stringsplit($_word,"") $_jumble=$_letters[1] $_used=" |" $_count=2 EndIf WEnd return $_jumble & $_letters[$_letters[0]] EndFunc edit.. added a few notes to it. and line continuations for easier reading. Edited January 15, 2005 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
DirtyBanditos Posted January 15, 2005 Share Posted January 15, 2005 Ok, I redid it, since folks seem to enjoy it. This version uses autoit to fine a word, and sends it to the mixup function. I added a simple if to test make sure there were no words that wouldn't get some mixing, and all puntuations should stay in tact.Also has a bit less code, and not so mickey moused.Huhu funny your Script Scriptkitty Link to comment Share on other sites More sharing options...
scriptkitty Posted January 15, 2005 Author Share Posted January 15, 2005 Dang, I should have spell checked my post! I think all the looking at mixed up words has warped my brain and the stuff I was typing looked right. Of course spell check wouldn't have told me I meant Find a word, etc, etc. AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
MrGrizzy Posted January 15, 2005 Share Posted January 15, 2005 Thanks for a really nice script. I tried it "much" to early in the morning. I copy / pasted the code into a new script and saved it. I was reviewing / then ran the code. I forgot the script was in the clipboard and i had to do a doubletake of the result then a dope slap to admit yeah - that is what i asked it to do. Again, nice! 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