ezzetabi 3 Posted November 22, 2004 (edited) Just like the BlackDiablo idea, but with my variation over chars. ;Check next one. Edited November 22, 2004 by ezzetabi Share this post Link to post Share on other sites
killaz219 2 Posted November 22, 2004 Nice and compact, have yet to try it though. You are the third person to make a 1337 converter. Guess you didn't like the scripts. Share this post Link to post Share on other sites
layer 2 Posted November 22, 2004 Here ya go!: $test= Inputbox ("Ezzetabi's Translator", "This is a BETA of Ezzetabi's translator, type anything:") $test = $test $test = _4lter($test) MsgBox(0,'',$test) Func _4lter($sText) $aOriginal = StringSplit(StringReplace('Q;W;E;R;T;Y; U;I;O;P;A;S;D;F;G; H;J;K;L; Z;'_ & 'X;C;V;B; N; M;q;w;e;r;t;y;u;i;o;p;a;s;d;f;g;h;j;k;l;z;x;c;v;b;n;m',' ',''),';') $a041tered = StringSplit(StringReplace('Q;VV;3;®;7;¥;|_|;1;();|³;4;§;|);F;6;|-|;J;|<;|_;~/_;'_ & '><;Ç;\%;ß;/\/;|\/|;q;w;ë;r;t;µ;µ;¡;ø;|>;ð;s;Þ;;9;h;];k;|;z;×;¢;v;þ;n;m',' ',''),';') For $c = 1 to $aOriginal[0] $sText = StringReplace($sText,$aOriginal[$c], $a041tered[$c],0,1) Next Return $sText EndFunc Maybe you should add a nice GUI interface =) FootbaG Share this post Link to post Share on other sites
killaz219 2 Posted November 22, 2004 (edited) Layer, You should atleast have it write to a file or something, because you cant get text from a message window. Edited November 22, 2004 by killaz219 Share this post Link to post Share on other sites
layer 2 Posted November 22, 2004 Heh, I'm half way done with Ezzetabi's GUI version...So don't worry, it will be outputed in something you can cut and paste... FootbaG Share this post Link to post Share on other sites
killaz219 2 Posted November 22, 2004 Heh, I'm half way done with Ezzetabi's GUI version...So don't worry, it will be outputed in something you can cut and paste...<{POST_SNAPBACK}>I guess it dosn't make it Ezzetabi's GUI version then does it? Share this post Link to post Share on other sites
layer 2 Posted November 22, 2004 That's why Im going to hang onto it until she makes hers... Unless she wants the code, she can have it =) I'm not just going to go posting it up for her, I'm just making it now because I'm bored =P But I won't post it. FootbaG Share this post Link to post Share on other sites
SlimShady 1 Posted November 22, 2004 That's why Im going to hang onto it until she makes hers... Unless she wants the code, she can have it =) I'm not just going to go posting it up for her, I'm just making it now because I'm bored =P But I won't post it.<{POST_SNAPBACK}> Snce when is Ezzetabi a girl? Share this post Link to post Share on other sites
ezzetabi 3 Posted November 22, 2004 (edited) Why bothering with copy and paste? ;Check the next one, again... Changed some chars, so it is more readable. Edit: updated. Edited November 24, 2004 by ezzetabi Share this post Link to post Share on other sites
layer 2 Posted November 22, 2004 Hmmm, I like this one better then the first one =) FootbaG Share this post Link to post Share on other sites
Guest Py7|-|[]/\/ Posted November 23, 2004 Nice. =) Share this post Link to post Share on other sites
ezzetabi 3 Posted November 24, 2004 (edited) I dropped the lossy idea of string replacing all characters, since a guy that actually write probably don't alters each and every character at the same way. This time, it is much more random, many characters have more than one translation and they also may not translated at all! (a may become @ or 4 or stay a e.g.) I think the result is much more credible, and also nice. If you want to make a new line use a /n in C style. <- NEW! expandcollapse popup$msg = InputBox(_4lter('Write!'), _4lter('Write your sentence.')) If @error Then Exit $msg = _4lter($msg) ClipPut($msg) ;MsgBox(0, '', $msg) Func _4lter($sText) Local $const = .6;Set here how much do you want to modify the string, from 0(never) to 1(always) Local $aOriginal, $a041tered, $c, $l = 1, $i, $aChars, $sOutPut = '', $f = 1 $aOriginal = StringSplit(StringReplace('?;CE;AE;ae;Q;V ;E;R;T;Y; U;I;O ;P; A;' & _ 'S;D;F;G; H;J; K;L; Z;X;C;W; B; N; M ;q;w ;e;r;t;y;u;i;o;p;a;' & _ 's;d;f;g;h;j;k ;l;z;x;c;v;b;n;m', ' ', ''), ';') $a041tered = StringSplit(StringReplace('¿;Œ;Æ; æ;Q;\%,\/;3,€;®;7;¥;|_|;1;Ø,(),0;|³;4,@;' & _ '§;|);F;6;|-|;J;|<;|_;~/_;><;Ç;VV;ß;/\/,|\|;|\/|,/\/\;q;w,vv;ë,3;r;†;µ,¥;ù,µ;i;ø,0;|>;ð,4;' & _ 's,§;Þ;ƒ;9;h;];k,1<;|,1;z;×;¢,ç;v;þ;n;m', ' ', ''), ';') $sText = StringReplace($sText,'\n',@crlf) While $l <= StringLen($sText) $f = 0 If Random() < $const Then $f = 0 For $c = 1 To $aOriginal[0] $i = StringLen($aOriginal[$c]) If StringMid($sText, $l, $i) == $aOriginal[$c] Then If StringInStr($a041tered[$c], ',') Then $aChar = StringSplit($a041tered[$c], ',') $sOutPut = $sOutPut & $aChar[Int(Random(1, $aChar[0] + 1)) ] Else $sOutPut = $sOutPut & $a041tered[$c] EndIf $l = $l + $i $f = 1 EndIf If $f = 1 Then ExitLoop Next EndIf If $f = 0 Then $sOutPut = $sOutPut & StringMid($sText, $l, 1) $l = $l + 1 EndIf Wend Return $sOutPut EndFunc ;==>_4lter Ok, the code may seems a little harder to read... Bear with it. Edited November 25, 2004 by ezzetabi Share this post Link to post Share on other sites
layer 2 Posted November 25, 2004 Hey! That's pretty cool. I like how it replaces it with different characters... Except using the inputbox you provided doesn't work, so heres something that works. Same thing, just a different inputbox: expandcollapse popup$hey= InputBox ("Ezzetabi's Translator", "Write a sentence to translate:") $hi= _4lter($hey) MsgBox (0, "Translated Text:", $hi) Func _4lter($sText) Local $const = .6;Set here how much do you want to modify the string, from 0(never) to 1(always) Local $aOriginal, $a041tered, $c, $l = 1, $i, $aChars, $sOutPut = '', $f = 1 $aOriginal = StringSplit(StringReplace('?;CE;AE;ae;Q;V ;E;R;T;Y; U;I;O ;P; A;' & _ 'S;D;F;G; H;J; K;L; Z;X;C;W; B; N; M ;q;w ;e;r;t;y;u;i;o;p;a;' & _ 's;d;f;g;h;j;k ;l;z;x;c;v;b;n;m', ' ', ''), ';') $a041tered = StringSplit(StringReplace('¿;;Æ; æ;Q;\%,\/;3,;®;7;¥;|_|;1;Ø,(),0;|³;4,@;' & _ '§;|);F;6;|-|;J;|<;|_;~/_;><;Ç;VV;ß;/\/,|\|;|\/|,/\/\;q;w,vv;ë,3;r;;µ,¥;ù,µ;i;ø,0;|>;ð,4;' & _ 's,§;Þ;;9;h;];k,1<;|,1;z;×;¢,ç;v;þ;n;m', ' ', ''), ';') While $l <= StringLen($sText) $f = 0 If Random() < $const Then $f = 0 For $c = 1 To $aOriginal[0] $i = StringLen($aOriginal[$c]) If StringMid($sText, $l, $i) == $aOriginal[$c] Then If StringInStr($a041tered[$c], ',') Then $aChar = StringSplit($a041tered[$c], ',') $sOutPut = $sOutPut & $aChar[Int(Random(1, $aChar[0] + 1)) ] Else $sOutPut = $sOutPut & $a041tered[$c] EndIf $l = $l + $i $f = 1 EndIf Next EndIf If $f = 0 Then $sOutPut = $sOutPut & StringMid($sText, $l, 1) $l = $l + 1 EndIf Wend Return $sOutPut EndFunc ;==>_4lter I think I will use this on my friends and send a whole letter to them =P Hehe Good work FootbaG Share this post Link to post Share on other sites
ezzetabi 3 Posted November 25, 2004 Whats wrong with my Inputbox? Did you see yours? Did you try to click 'Cancel'? Edit: fixed a small bug. Share this post Link to post Share on other sites
layer 2 Posted November 25, 2004 I wasn't being mean! Except the input box in your code didn't show up for me So I had to make one that showed up for me FootbaG Share this post Link to post Share on other sites
ezzetabi 3 Posted November 25, 2004 Pretty silly, but fun... $aList = WinList() For $c = 1 to $aList[0][0] If $aList[$c][0] <> '' Then WinSetTitle($aList[$c][1],'',_4lter($aList[$c][0])) EndIf Next You need the lastest unstable to try this out. I'd like to add this feature in a undocumentated !command in Run!, do you think is an interesting easter egg? Share this post Link to post Share on other sites
layer 2 Posted November 25, 2004 Eh, where do I get the LATEST version, I have the unstable, but I don't have the new uploade ones... FootbaG Share this post Link to post Share on other sites
Josbe 1 Posted November 25, 2004 Eh, where do I get the LATEST version, I have the unstable, but I don't have the new uploade ones...<{POST_SNAPBACK}>What do you need? AutoIt3 v3.0.102 (release, no GUI)AutoIt3 v3.0.103 (unstable, +GUI) AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Share this post Link to post Share on other sites
ezzetabi 3 Posted November 25, 2004 GUI version... expandcollapse popup#include <GUIConstants.au3> Opt ('MustDeclareVars', 1) Global $Const = .6 Dim $msg, $style, $ctrInput, $ctrSlider, $ctrQuit, $ctrTran, $ctrClip, $sInput GUICreate("Ezzetabi's traslator", 500, 400) $style = $ES_WANTRETURN + $WS_VSCROLL + $WS_HSCROLL + $ES_AUTOVSCROLL + $ES_AUTOHSCROLL + $ES_NOHIDESEL + $ES_MULTILINE $ctrInput = GUICtrlCreateInput('', 1, 1, 498, 378, $style) $ctrSlider = GUICtrlCreateSlider(1, 379, 80, 20) GUICtrlSetLimit($ctrSlider, 10, 1) GUICtrlSetData($ctrSlider, 6) GUICtrlCreateLabel('Set how much you want altering the text.', 81, 383, -1, -1) $ctrQuit = GUICtrlCreateButton('&Quit', 444, 380, 55, 20) $ctrTran = GUICtrlCreateButton('&Translate', 389, 380, 55, 20) $ctrClip = GUICtrlCreateButton('&Copy2Clip', 334, 380, 55, 20) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $ctrQuit ExitLoop Case $msg = $ctrSlider $Const = GUIRead($ctrSlider) / 10 Case $msg = $ctrTran GUICtrlSetState($ctrTran, $GUI_DISABLE) GUICtrlSetState($ctrInput, $GUI_DISABLE) $sInput = _4lter(GUIRead($ctrInput)) GUICtrlSetData($ctrInput, $sInput) GUICtrlSetState($ctrTran, $GUI_ENABLE) GUICtrlSetState($ctrInput, $GUI_ENABLE) Case $msg = $ctrClip ClipPut($sInput) EndSelect Wend Exit Func _4lter($sText) ;$Const is global Local $aOriginal, $a041tered, $c, $l = 1, $i, $aChar, $sOutPut = '', $f = 1 $aOriginal = StringSplit(StringReplace('?;CE;AE;ae;Q;V ;E;R;T;Y; U;I;O ;P; A;' & _ 'S;D;F;G; H;J; K; L; Z;X;C;W; B; N; M ;q;w ;e;r;t;y;u;i;o;p;a;' & _ 's;d;f;g;h;j;k ;l;z;x;c;v;b;n;m', ' ', ''), ';') $a041tered = StringSplit(StringReplace('¿;Œ;Æ; æ;Q;\%,\/;&,3,€;®;7;¥;|_|;1;Ø,(),0;|³;4,@;' & _ '§;|),Ð;F;6;|-|;J;|<;|_;~/_,Ž;><;Ç;VV;ß;/\/,|\|,Ñ;|\/|,/\/\;q;w,vv;ë,3;r;†;µ,¥;ù,µ;i;ø,0;|>;ð,4;' & _ 's,§;Þ;ƒ;9;h;];k,1<;|,1;z;×;©,¢,ç;v;þ;ñ;m', ' ', ''), ';') While $l <= StringLen($sText) $f = 0 If Random() < $Const Then $f = 0 For $c = 1 To $aOriginal[0] $i = StringLen($aOriginal[$c]) If StringMid($sText, $l, $i) == $aOriginal[$c] Then If StringInStr($a041tered[$c], ',') Then $aChar = StringSplit($a041tered[$c], ',') $sOutPut = $sOutPut & $aChar[Int(Random(1, $aChar[0] + 1)) ] Else $sOutPut = $sOutPut & $a041tered[$c] EndIf $l = $l + $i $f = 1 EndIf If $f = 1 Then ExitLoop Next EndIf If $f = 0 Then $sOutPut = $sOutPut & StringMid($sText, $l, 1) $l = $l + 1 EndIf Wend Return $sOutPut EndFunc ;==>_4lter Share this post Link to post Share on other sites
erifash 1 Posted November 25, 2004 Another GUI version... I was going to post it but you beat me to it! Anyways, here: expandcollapse popup#include <GUIConstants.au3> GUICreate("_4lter GUI Version", 530, 225, (@DesktopWidth - 757) / 2, (@DesktopHeight - 262) / 2, 0x04CF0000) $edit = GUICtrlCreateEdit("", 5, 5, 520, 190, 0x00200000) $alter = GUICtrlCreateButton("Alter", 5, 200, 70, 20) $copy = GUICtrlCreateButton("Copy to Clipboard", 75, 200, 130, 20) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $copy ClipPut(GUIRead($edit)) Case $msg = $alter $text = _4lter(GUIRead($edit)) GUICtrlSetData($edit, "") GUICtrlSetData($edit, $text) EndSelect Wend Func _4lter($sText) Local $const = .6;Set here how much do you want to modify the string, from 0(never) to 1(always) Local $aOriginal, $a041tered, $c, $l = 1, $i, $aChars, $sOutPut = '', $f = 1 $aOriginal = StringSplit(StringReplace('?;CE;AE;ae;Q;V ;E;R;T;Y; U;I;O ;P; A;' & _ 'S;D;F;G; H;J; K;L; Z;X;C;W; B; N; M ;q;w;e;r;t;y;u;i;o;p;a;' & _ 's;d;f;g;h;j;k;l;z;x;c;v;b;n;m', ' ', ''), ';') $a041tered = StringSplit(StringReplace('¿;;Æ; æ;Q;\%,\/;3,;®;7;¥;|_|;1;Ø,(),0;|³;4,@;' & _ '§;|);F;6;|-|;J;|<;|_;~/_;><;Ç;VV;ß;/\/,|\|;|\/|,/\/\;q;w,vv;ë,3;r;;µ,¥;ù,µ;i;ø,0;|>;ð,4;' & _ 's,§;Þ;;9;h;];k,1<;|,1;z;×;¢,ç;v;þ;n;m', ' ', ''), ';') $sText = StringReplace($sText,'\n',@crlf) While $l <= StringLen($sText) $f = 0 If Random() < $const Then $f = 0 For $c = 1 To $aOriginal[0] $i = StringLen($aOriginal[$c]) If StringMid($sText, $l, $i) == $aOriginal[$c] Then If StringInStr($a041tered[$c], ',') Then $aChar = StringSplit($a041tered[$c], ',') $sOutPut = $sOutPut & $aChar[Int(Random(1, $aChar[0] + 1)) ] Else $sOutPut = $sOutPut & $a041tered[$c] EndIf $l = $l + $i $f = 1 EndIf If $f = 1 Then ExitLoop Next EndIf If $f = 0 Then $sOutPut = $sOutPut & StringMid($sText, $l, 1) $l = $l + 1 EndIf Wend Return $sOutPut EndFunc ;==>_4lter My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Share this post Link to post Share on other sites