WHAT THIS DOES
it scrambles a word that is typed into the Input box.. and displays it in a Msgbox... although it reuses the letters.. :\ havent figured that out yet haha tell me what you think?
#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=ico.ico #AutoIt3Wrapper_Res_Comment=Authored by : Bob #AutoIt3Wrapper_Res_Description=Scambles and converts text #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <EditConstants.au3> #include <Misc.au3> #include <String.au3> #include <Array.au3> FileInstall ('F:\DIGITAL LOGIC\Word scrammbler\GUI.bmp', @ScriptDir & '\GUI.bmp') $Gui=GUICreate(@ScriptName, 400, 400, -1, -1, $WS_POPUP, $WS_EX_LAYERED) GUICtrlCreatePic(@ScriptDir & '\GUI.bmp', 0, 0, 400, 400) GUICtrlSetState(-1, $GUI_DISABLE) $Title=GUICtrlCreateLabel(@ScriptName, 50, 10, 300, 30, $SS_CENTER) GUICtrlSetBkColor($Title, 0x1f1f1f) GUICtrlSetColor($Title, 0xc8b77d) GUICtrlSetFont($Title, 20, 300, 4, '') $Exit=GUICtrlCreateLabel('x', 350, 10, 20, 20) GUICtrlSetBkColor($Exit, 0x1f1f1f) GUICtrlSetColor($Exit, 0xe8e8e8) GUICtrlSetFont($Exit, '', 300, '', 'Arial Black') $Min=GUICtrlCreateLabel('_', 20, 10, 20, 20) GUICtrlSetBkColor($Min, 0x1f1f1f) GUICtrlSetColor($Min, 0xe8e8e8) GUICtrlSetFont($Min, '', 300, '', 'Arial Black') $Help=GUICtrlCreateLabel('?', 40, 10, 20, 20) GUICtrlSetBkColor($Help, 0x1f1f1f) GUICtrlSetColor($Help, 0xe8e8e8) GUICtrlSetFont($Help, '', 300, '', 'Arial Black') $Input=GUICtrlCreateInput('Type word\phrase in here...', 50, 70, 300, 100, 5) GUICtrlSetFont($Input, 10, 800, '', 'Lucida Console') GUICtrlSetBkColor($Input, 0xe8e8e8) $Output=GUICtrlCreateEdit('', 50, 220, 300, 100, 2103360) GUICtrlSetFont($Output, 10, 800, '', 'Lucida Console') GUICtrlSetBkColor($Output, 0xe8e8e8) $bScammble=GUICtrlCreateButton('Scammble', 55, 180, 90, 30) $bHEX=GUICtrlCreateButton('HEX it', 155, 180, 90, 30) $bBIN=GUICtrlCreateButton('BIN it', 255, 180, 90, 30) $bBINCHR=GUICtrlCreateButton('BIN to Chr', 255, 330, 90, 30) $bHEXCHR=GUICtrlCreateButton('HEX to Chr', 155, 330, 90, 30) GUICtrlSetState($bHEXCHR, $GUI_DISABLE) GUICtrlSetState($bBINCHR, $GUI_DISABLE) GUICtrlSetState($bHEX, $GUI_ENABLE) GUICtrlSetState($bScammble, $GUI_ENABLE) GUICtrlSetState($bBIN, $GUI_ENABLE) GUISetState() While 1 $m=GUIGetMsg() $a=GUICtrlRead($Input) If $m=$Help Then MsgBox(32, '_____This is a Help Guide to WORD SCRAMMBLER._____', '' & _ @CRLF & '<This is authored by Cody Barrett.>' & _ @CRLF & @CRLF & 'The Controls are as follows :' & _ @CRLF & '*To Exit Click on the "X" in the top right corner.' & _ @CRLF & '*OR Alternately Press "ESC" while the window is active' & _ @CRLF & '*To Minimize Click the "_" in the Top left corner.' & _ @CRLF & @CRLF & 'The Steps to using it are:' & _ @CRLF & '1. Firstly type in any phrase or word into the input box.' & _ @CRLF & '2. Then Click "SCAMMBLE" and it will show the scrammbled string in the bottom box.' & _ @CRLF & '3. Or Click "HEX it" and it will show the Hexadecimal string in the bottom box.' & _ @CRLF & '4. And Click "HEX to Chr" and it will show the Chr string in the top box.' & _ @CRLF & '5. Or Click "BIN it" and it will show the Binary string in the bottom box.' & _ @CRLF & '6. And Click "BIN to Chr" and it will show the Chr string in the Top box.' & _ '') EndIf If $m=$Min Then WinSetState($Gui, '', @SW_MINIMIZE) If $m=$Exit Or $m = $GUI_EVENT_CLOSE Then Exit If $m=$Title Then Do ;DO UNTIL loop $mgp=MouseGetPos() WinMove($Gui, '', $mgp[0], $mgp[1]) Until Not _IsPressed('01') EndIf If $m=$bHEX Then GUICtrlSetData($Output, '') $string=GUICtrlRead($Input) $string=_StringToHex($string) GUICtrlSetData($Output, $string) GUICtrlSetData($Input, '') GUICtrlSetState($bHEX, $GUI_DISABLE) GUICtrlSetState($bHEXCHR, $GUI_ENABLE) GUICtrlSetState($bScammble, $GUI_DISABLE) GUICtrlSetState($bBIN, $GUI_DISABLE) GUICtrlSetState($bBINCHR, $GUI_DISABLE) $string='' EndIf If $m=$bHEXCHR Then GUICtrlSetData($Input, '') $string=GUICtrlRead($Output) $string=_HexToString($string) GUICtrlSetData($Input, $string) GUICtrlSetData($Output, '') GUICtrlSetState($bHEXCHR, $GUI_DISABLE) GUICtrlSetState($bHEX, $GUI_ENABLE) GUICtrlSetState($bScammble, $GUI_ENABLE) GUICtrlSetState($bBIN, $GUI_ENABLE) $string='' EndIf If $m=$bBIN Then GUICtrlSetData($Output, '') $string='' $a=StringSplit($a, '') For $i=1 To $a[0] $Asc=Asc($a[$i]) If $Asc<>32 Then $oBin='' For $iii=7 To 0 Step -1 If $Asc>=2^$iii Then $Asc-=2^$iii $oBin&=1 Else $oBin&=0 EndIf Next GUICtrlSetData($Output, GUICtrlRead($Output) & ' ' & $oBin) Else GUICtrlSetData($Output, GUICtrlRead($Output) & ' -') EndIf Next GUICtrlSetData($Input, '') GUICtrlSetState($bBIN, $GUI_DISABLE) GUICtrlSetState($bScammble, $GUI_DISABLE) GUICtrlSetState($bHEX, $GUI_DISABLE) GUICtrlSetState($bBINCHR, $GUI_ENABLE) EndIf If $m=$bBINCHR Then $string='' $Asc='' $a=GUICtrlRead ($Output) $a=StringSplit($a, '-') For $i=1 To $a[0] If StringLeft ($a[$i],1)=' ' Then $a[$i]=StringTrimLeft ($a[$i], 1) If StringRight ($a[$i],1)=' ' Then $a[$i]=StringTrimRight($a[$i], 1) $b=StringSplit ($a[$i], ' ') For $ii=1 To $b[0] $Asc=0 For $iii=0 To 7 If StringMid ($b[$ii], 8-$iii, 1)=1 Then $Asc+=2^$iii Next $l=Chr ($Asc) $string&=$l $l='' Next Next GUICtrlSetData ($Input ,$string) GUICtrlSetData ($Output , '') GUICtrlSetState($bHEX, $GUI_ENABLE) GUICtrlSetState($bBIN, $GUI_ENABLE) GUICtrlSetState($bScammble, $GUI_ENABLE) GUICtrlSetState($bBINCHR, $GUI_DISABLE) EndIf If $m=$bScammble Then GUICtrlSetData($Output, '') $string='' $a=StringSplit($a, '') For $i=1 To $a[0] Do $r=Random(1, $a[0], 1) Until StringLen($a[$r]) > 0 $string&=$a[$r] $a[$r]='' Next GUICtrlSetData($Output, $string, '') $string='' $a[0]='' EndIf WEnd
Edited by CodyBarrett, 27 April 2009 - 02:52 AM.






