Jump to content

2o2

Active Members
  • Posts

    58
  • Joined

  • Last visited

Everything posted by 2o2

  1. im confuzed??
  2. Naw... I had to work at it because I don't spend my whole life making autoit scripts... get a life, get laid, seriously...
  3. Thanks Alot Guys....
  4. I finally got this script to work!!! thanks a lot Martin and Crazfx and the guy who told me i could include <string.au3> and use _hextostring and _stringtohex!! Here is the script. Thanks Guys!! #include <GUIConstants.au3> #include <string.au3> guicreate("Binary Converter", 300, 300) $menu = guictrlcreatemenu("Menu") $open = guictrlcreatemenuitem("Open", $menu) $save = guictrlcreatemenuitem("Save", $menu) $copy = guictrlcreatemenuitem("Copy", $menu) $paste = Guictrlcreatemenuitem("Paste", $menu) $exit = Guictrlcreatemenuitem("Exit", $menu) $about = Guictrlcreatemenuitem("About", $menu) $display = Guictrlcreateedit("", 5, 60, 290, 215) $tobinary = Guictrlcreatebutton("Convert to Binary", 5, 5, 145, 50) $tostring = Guictrlcreatebutton("Convert to String", 150, 5, 145, 50) guisetstate(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case ($msg = -3) Exit Case ($msg = $copy) $readata = guictrlread($display) clipput($readata) Case ($msg = $paste) $put = clipget() guictrlsetdata($display, $put) Case ($msg = $exit) Exit Case ($msg = $about) msgbox(0, "About", "") Case ($msg = $open) $openfile = fileopendialog("Open", @desktopdir, "All Files (*.*)") $openfileread = fileopen($openfile, 0) $data2 = fileread($openfileread) guictrlsetdata($display, $data2) Case ($msg = $save) $readdata = guictrlread($display) $savedialog = filesavedialog("Save", @desktopdir, "Text Files (*.txt)") filewrite($savedialog, $readdata) Case ($msg = $tobinary) $input5 = guictrlread($display) $input4 = _StringToHex($input5) $res = _HexToBinaryString($input4) switch @error Case 0 Guictrlsetdata($display, $res) Case -1 MsgBox(0,'ERROR',$input & ' is not a valid Hex value.') case -2 Guictrlsetdata($display, '') EndSwitch Case ($msg = $tostring) $binaryvalue = guictrlread($display) $res = _BinaryToHexString($BinaryValue) $res1 = _hextostring($res) switch @error Case 0 Guictrlsetdata($display, $res1) Case -1 MsgBox(0,'ERROR',$input & ' is not a valid Binary value.') case -2 Guictrlsetdata($display, '') EndSwitch EndSelect WEnd Func _BinaryToHexString($BinaryValue) Local $test, $Result = '',$numbytes,$nb if $BinaryValue = '' Then SetError(-2) Return endif Local $bits = "0000|0001|0010|0011|0100|0101|0110|0111|1000|1001|1010|1011|1100|1101|1110|1111" $bits = stringsplit($bits,'|') #region check string is binary $test = stringreplace($BinaryValue,'1','') $test = stringreplace($test,'0','') if $test <> '' Then SetError(-1);non binary character detected Return endif #endregion check string is binary #region make binary string an integral multiple of 4 characters While 1 $nb = Mod(StringLen($BinaryValue),4) if $nb = 0 then exitloop $BinaryValue = '0' & $BinaryValue WEnd #endregion make binary string an integral multiple of 4 characters $numbytes = Int(StringLen($BinaryValue)/4);the number of bytes Dim $bytes[$numbytes],$Deci[$numbytes] For $j = 0 to $numbytes - 1;for each byte ;extract the next byte $bytes[$j] = StringMid($BinaryValue,1+4*$j,4) ;find what the dec value of the byte is for $k = 0 to 15;for all the 16 possible hex values if $bytes[$j] = $bits[$k+1] Then $Deci[$j] = $k ExitLoop EndIf next Next ;now we have the decimal value for each byte, so stitch the string together again $Result = '' for $l = 0 to $numbytes - 1 $Result &= Hex($Deci[$l],1) Next return $Result EndFunc Func _HexToBinaryString($HexValue) Local $Allowed = '0123456789ABCDEF' Local $Test,$n Local $Result = '' if $hexValue = '' then SetError(-2) Return EndIf $hexvalue = StringSplit($hexvalue,'') for $n = 1 to $hexValue[0] if not StringInStr($Allowed,$hexvalue[$n]) Then SetError(-1) return 0 EndIf Next Local $bits = "0000|0001|0010|0011|0100|0101|0110|0111|1000|1001|1010|1011|1100|1101|1110|1111" $bits = stringsplit($bits,'|') for $n = 1 to $hexvalue[0] $Result &= $bits[Dec($hexvalue[$n])+1] Next Return $Result EndFunc
  5. Heres my almost perfect script. It almost works. how would i get it to work with more than like 10 characters and when you press enter, and why does "b" turn out as "`"?? Help Plz #include <GUIConstants.au3> #include <string.au3> guicreate("Binary Converter", 300, 300) $menu = guictrlcreatemenu("Menu") $open = guictrlcreatemenuitem("Open", $menu) $save = guictrlcreatemenuitem("Save", $menu) $copy = guictrlcreatemenuitem("Copy", $menu) $paste = Guictrlcreatemenuitem("Paste", $menu) $exit = Guictrlcreatemenuitem("Exit", $menu) $about = Guictrlcreatemenuitem("About", $menu) $display = Guictrlcreateedit("", 5, 60, 290, 215) $tobinary = Guictrlcreatebutton("Convert to Binary", 5, 5, 145, 50) $tostring = Guictrlcreatebutton("Convert to String", 150, 5, 145, 50) guisetstate(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case ($msg = -3) Exit Case ($msg = $copy) $readata = guictrlread($display) clipput($readata) Case ($msg = $paste) $put = clipget() guictrlsetdata($display, $put) Case ($msg = $exit) Exit Case ($msg = $about) msgbox(0, "About", "") Case ($msg = $open) $openfile = fileopendialog("Open", @desktopdir, "All Files (*.*)") $openfileread = fileopen($openfile, 0) $data2 = fileread($openfileread) guictrlsetdata($display, $data2) Case ($msg = $save) $readdata = guictrlread($display) $savedialog = filesavedialog("Save", @desktopdir, "Text Files (*.txt)") filewrite($savedialog, $readdata) Case ($msg = $tobinary) $input = guictrlread($display) $input = _StringToHex($input) $hexvalue = StringSplit($input,'') $Result = '' $bits = "0000|1001|0010|0011|0100|0101|0110|0111|1000|1001|10410|1011|1100|1101|1110|1111" $bits = stringsplit($bits,'|') for $n = 1 to $hexvalue[0] $result &= $bits[Dec($hexvalue[$n])+1] Next Guictrlsetdata($display, $result) ;$data = guictrlread($display) ;$char = string($data) ;$bin = stringtobinary($char) ;Guictrlsetdata($display, $bin) Case ($msg = $tostring) $binaryvalue = guictrlread($display) Local $test, $Result = '',$numbytes,$nb if $BinaryValue = '' Then SetError(-2) Return endif Local $bits = "0010|1001|0010|0011|0100|0101|0110|0111|1000|1001|1010|1011|1100|1101|1110|1111" $bits = stringsplit($bits,'|') #region check string is binary $test = stringreplace($BinaryValue,'1','') $test = stringreplace($test,'0','') if $test <> '' Then guictrlsetdata($display, "This is not a valid binary number") endif #endregion check string is binary #region make binary string an integral multiple of 4 characters While 1 $nb = Mod(StringLen($BinaryValue),4) if $nb = 0 then exitloop $BinaryValue = '0' & $BinaryValue WEnd #endregion make binary string an integral multiple of 4 characters $numbytes = Int(StringLen($BinaryValue)/4);the number of bytes Dim $bytes[$numbytes],$Deci[$numbytes] For $j = 0 to $numbytes - 1;for each byte ;extract the next byte $bytes[$j] = StringMid($BinaryValue,1+4*$j,4) ;find what the dec value of the byte is for $k = 0 to 15;for all the 16 possible hex values if $bytes[$j] = $bits[$k+1] Then $Deci[$j] = $k ExitLoop EndIf next Next ;now we have the decimal value for each byte, so stitch the string together again $Result = '' for $l = 0 to $numbytes - 1 $Result &= Hex($Deci[$l],1) Next $result1 = _HexToString($result) guictrlsetdata($display, $result1) ;$data1 = guictrlread($display) ;$bin1 = binary($data1) ;$string = binarytostring($data1) ;GUICtrlSetData($display, $string) EndSelect WEnd
  6. How would i convert string to hexidecmal and hexidecmal back to a string?? Please Help
  7. I love how i inspired u and i have no idea wat im doin!! lol!!
  8. I now have this. It kinda works half the time and half the time it doesnt. it makes s and 0 the same binary value. How do i fix this?? #include <GUIConstants.au3> guicreate("Binary Converter", 300, 300) $menu = guictrlcreatemenu("Menu") $open = guictrlcreatemenuitem("Open", $menu) $save = guictrlcreatemenuitem("Save", $menu) $copy = guictrlcreatemenuitem("Copy", $menu) $paste = Guictrlcreatemenuitem("Paste", $menu) $exit = Guictrlcreatemenuitem("Exit", $menu) $about = Guictrlcreatemenuitem("About", $menu) $display = Guictrlcreateedit("", 5, 60, 290, 215) $tobinary = Guictrlcreatebutton("Convert to Binary", 5, 5, 145, 50) $tostring = Guictrlcreatebutton("Convert to String", 150, 5, 145, 50) guisetstate(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case ($msg = -3) Exit Case ($msg = $copy) $readata = guictrlread($display) clipput($readata) Case ($msg = $paste) $put = clipget() guictrlsetdata($display, $put) Case ($msg = $exit) Exit Case ($msg = $about) msgbox(0, "About", "") Case ($msg = $open) $openfile = fileopendialog("Open", @desktopdir, "All Files (*.*)") $openfileread = fileopen($openfile, 0) $data2 = fileread($openfileread) guictrlsetdata($display, $data2) Case ($msg = $save) $readdata = guictrlread($display) $savedialog = filesavedialog("Save", @desktopdir, "Text Files (*.txt)") filewrite($savedialog, $readdata) Case ($msg = $tobinary) $input = guictrlread($display) $hexvalue = StringSplit($input,'') $Result = '' $bits = "0000|0001|0010|0011|0100|0101|0110|0111|1000|1001|1010|1011|1100|1101|1110|1111" $bits = stringsplit($bits,'|') for $n = 1 to $hexvalue[0] $result &= $bits[Dec($hexvalue[$n])+1] Next Guictrlsetdata($display, $result) ;$data = guictrlread($display) ;$char = string($data) ;$bin = stringtobinary($char) ;Guictrlsetdata($display, $bin) Case ($msg = $tostring) $binaryvalue = guictrlread($display) Local $test, $Result = '',$numbytes,$nb if $BinaryValue = '' Then SetError(-2) Return endif Local $bits = "0000|0001|0010|0011|0100|0101|0110|0111|1000|1001|1010|1011|1100|1101|1110|1111" $bits = stringsplit($bits,'|') #region check string is binary $test = stringreplace($BinaryValue,'1','') $test = stringreplace($test,'0','') if $test <> '' Then SetError(-1);non binary character detected Return endif #endregion check string is binary #region make binary string an integral multiple of 4 characters While 1 $nb = Mod(StringLen($BinaryValue),4) if $nb = 0 then exitloop $BinaryValue = '0' & $BinaryValue WEnd #endregion make binary string an integral multiple of 4 characters $numbytes = Int(StringLen($BinaryValue)/4);the number of bytes Dim $bytes[$numbytes],$Deci[$numbytes] For $j = 0 to $numbytes - 1;for each byte ;extract the next byte $bytes[$j] = StringMid($BinaryValue,1+4*$j,4) ;find what the dec value of the byte is for $k = 0 to 15;for all the 16 possible hex values if $bytes[$j] = $bits[$k+1] Then $Deci[$j] = $k ExitLoop EndIf next Next ;now we have the decimal value for each byte, so stitch the string together again $Result = '' for $l = 0 to $numbytes - 1 $Result &= Hex($Deci[$l],1) Next guictrlsetdata($display, $result) ;$data1 = guictrlread($display) ;$bin1 = binary($data1) ;$string = binarytostring($data1) ;GUICtrlSetData($display, $string) EndSelect WEnd
  9. I now have this. It kinda works half the time and half the time it doesnt. it makes s and 0 the same binary value. How do i fix this?? #include <GUIConstants.au3> guicreate("Binary Converter", 300, 300) $menu = guictrlcreatemenu("Menu") $open = guictrlcreatemenuitem("Open", $menu) $save = guictrlcreatemenuitem("Save", $menu) $copy = guictrlcreatemenuitem("Copy", $menu) $paste = Guictrlcreatemenuitem("Paste", $menu) $exit = Guictrlcreatemenuitem("Exit", $menu) $about = Guictrlcreatemenuitem("About", $menu) $display = Guictrlcreateedit("", 5, 60, 290, 215) $tobinary = Guictrlcreatebutton("Convert to Binary", 5, 5, 145, 50) $tostring = Guictrlcreatebutton("Convert to String", 150, 5, 145, 50) guisetstate(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case ($msg = -3) Exit Case ($msg = $copy) $readata = guictrlread($display) clipput($readata) Case ($msg = $paste) $put = clipget() guictrlsetdata($display, $put) Case ($msg = $exit) Exit Case ($msg = $about) msgbox(0, "About", "") Case ($msg = $open) $openfile = fileopendialog("Open", @desktopdir, "All Files (*.*)") $openfileread = fileopen($openfile, 0) $data2 = fileread($openfileread) guictrlsetdata($display, $data2) Case ($msg = $save) $readdata = guictrlread($display) $savedialog = filesavedialog("Save", @desktopdir, "Text Files (*.txt)") filewrite($savedialog, $readdata) Case ($msg = $tobinary) $input = guictrlread($display) $hexvalue = StringSplit($input,'') $Result = '' $bits = "0000|0001|0010|0011|0100|0101|0110|0111|1000|1001|1010|1011|1100|1101|1110|1111" $bits = stringsplit($bits,'|') for $n = 1 to $hexvalue[0] $result &= $bits[Dec($hexvalue[$n])+1] Next Guictrlsetdata($display, $result) ;$data = guictrlread($display) ;$char = string($data) ;$bin = stringtobinary($char) ;Guictrlsetdata($display, $bin) Case ($msg = $tostring) $binaryvalue = guictrlread($display) Local $test, $Result = '',$numbytes,$nb if $BinaryValue = '' Then SetError(-2) Return endif Local $bits = "0000|0001|0010|0011|0100|0101|0110|0111|1000|1001|1010|1011|1100|1101|1110|1111" $bits = stringsplit($bits,'|') #region check string is binary $test = stringreplace($BinaryValue,'1','') $test = stringreplace($test,'0','') if $test <> '' Then SetError(-1);non binary character detected Return endif #endregion check string is binary #region make binary string an integral multiple of 4 characters While 1 $nb = Mod(StringLen($BinaryValue),4) if $nb = 0 then exitloop $BinaryValue = '0' & $BinaryValue WEnd #endregion make binary string an integral multiple of 4 characters $numbytes = Int(StringLen($BinaryValue)/4);the number of bytes Dim $bytes[$numbytes],$Deci[$numbytes] For $j = 0 to $numbytes - 1;for each byte ;extract the next byte $bytes[$j] = StringMid($BinaryValue,1+4*$j,4) ;find what the dec value of the byte is for $k = 0 to 15;for all the 16 possible hex values if $bytes[$j] = $bits[$k+1] Then $Deci[$j] = $k ExitLoop EndIf next Next ;now we have the decimal value for each byte, so stitch the string together again $Result = '' for $l = 0 to $numbytes - 1 $Result &= Hex($Deci[$l],1) Next guictrlsetdata($display, $result) ;$data1 = guictrlread($display) ;$bin1 = binary($data1) ;$string = binarytostring($data1) ;GUICtrlSetData($display, $string) EndSelect WEnd
  10. Does this convert binary to string?? im confuzed? I have this converting string to binary but what should i do to convert this back to string?? And if the code that you wrote does, tell me how to apply that into my program plz! Case ($msg = $tobinary) $input = guictrlread($display) $hexvalue = StringSplit($input,'') $Result = '' $bits = "0000|0001|0010|0011|0100|0101|0110|0111|1000|1001|1010|1011|1100|1101|1110|1111" $bits = stringsplit($bits,'|') for $n = 1 to $hexvalue[0] $result &= $bits[Dec($hexvalue[$n])+1]
  11. I got it to work, but how would i convert binary back to string?????
  12. I got it to work, but how would i convert binary back to string?????
  13. Your script confuses me. Can you please write it so that it works with my program or explain how to make it work with my program. I am not an expert at strings so please help! Thanks!!
  14. It confuses me. How would i get it to work in my script??
  15. Theres my autoit script that converts string to binary and vice versa. I was wondering if anybody knew why the binary apears like this "0x6175746F697420646F65736E7420737570706F72742062696E617279" and not like this "0100101010101010100101010"??? could somebody please tell me how to get bare 1's and 0's binary?? If you can, could you please edit my script and make it work with the binary! thanks so much!! Martin can help me b/c hes amazing!! Ty Martin!! #include <GUIConstants.au3> guicreate("Binary Converter", 300, 300) $menu = guictrlcreatemenu("Menu") $open = guictrlcreatemenuitem("Open", $menu) $save = guictrlcreatemenuitem("Save", $menu) $copy = guictrlcreatemenuitem("Copy", $menu) $paste = Guictrlcreatemenuitem("Paste", $menu) $exit = Guictrlcreatemenuitem("Exit", $menu) $about = Guictrlcreatemenuitem("About", $menu) $display = Guictrlcreateedit("", 5, 60, 290, 215) $tobinary = Guictrlcreatebutton("Convert to Binary", 5, 5, 145, 50) $tostring = Guictrlcreatebutton("Convert to String", 150, 5, 145, 50) guisetstate(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case ($msg = -3) Exit Case ($msg = $copy) $readata = guictrlread($display) clipput($readata) Case ($msg = $paste) $put = clipget() guictrlsetdata($display, $put) Case ($msg = $exit) Exit Case ($msg = $about) msgbox(0, "About", "") Case ($msg = $open) $openfile = fileopendialog("Open", @desktopdir, "All Files (*.*)") $openfileread = fileopen($openfile, 0) $data2 = fileread($openfileread) guictrlsetdata($display, $data2) Case ($msg = $save) $readdata = guictrlread($display) $savedialog = filesavedialog("Save", @desktopdir, "Text Files (*.txt)") filewrite($savedialog, $readdata) Case ($msg = $tobinary) $data = guictrlread($display) $char = string($data) $bin = stringtobinary($char) Guictrlsetdata($display, $bin) Case ($msg = $tostring) $data1 = guictrlread($display) $bin1 = binary($data1) $string = binarytostring($bin1) GUICtrlSetData($display, $string) EndSelect WEnd
  16. #include <GUIConstants.au3> guicreate("Binary Converter", 300, 300) $menu = guictrlcreatemenu("Menu") $open = guictrlcreatemenuitem("Open", $menu) $save = guictrlcreatemenuitem("Save", $menu) $copy = guictrlcreatemenuitem("Copy", $menu) $paste = Guictrlcreatemenuitem("Paste", $menu) $exit = Guictrlcreatemenuitem("Exit", $menu) $about = Guictrlcreatemenuitem("About", $menu) $display = Guictrlcreateedit("", 5, 60, 290, 215) $tobinary = Guictrlcreatebutton("Convert to Binary", 5, 5, 145, 50) $tostring = Guictrlcreatebutton("Convert to String", 150, 5, 145, 50) guisetstate(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case ($msg = -3) Exit Case ($msg = $copy) $readata = guictrlread($display) clipput($readata) Case ($msg = $paste) $put = clipget() guictrlsetdata($display, $put) Case ($msg = $exit) Exit Case ($msg = $about) msgbox(0, "About", "") Case ($msg = $open) $openfile = fileopendialog("Open", @desktopdir, "All Files (*.*)") $openfileread = fileopen($openfile, 0) $data2 = fileread($openfileread) guictrlsetdata($display, $data2) Case ($msg = $save) $readdata = guictrlread($display) $savedialog = filesavedialog("Save", @desktopdir, "Text Files (*.txt)") filewrite($savedialog, $readdata) Case ($msg = $tobinary) $data = guictrlread($display) $char = string($data) $bin = stringtobinary($char) Guictrlsetdata($display, $bin) Case ($msg = $tostring) $data1 = guictrlread($display) $bin1 = binary($data1) $string = binarytostring($bin1) GUICtrlSetData($display, $string) EndSelect WEnd Theres my autoit script that converts string to binary and vice versa. I was wondering if anybody knew why the binary apears like this "0x6175746F697420646F65736E7420737570706F72742062696E617279" and not like this "0100101010101010100101010"??? could somebody please tell me how to get bare 1's and 0's binary??
  17. What are the exact tags that i need to use?? Here is what my .html file looks like #!C:\Program Files\AutoIt3\Include\AuCGI.exe ##WebApp <au3> Autoit Code <au3> do i use <au3>, <auw>, <?au3> for the tags ??? im confuzed
  18. yay 4 gamebots EDIT removed files
  19. k... ur cool
  20. 30 mins and it has not been locked yet!!
  21. thanks everybody for helping
  22. here is my keylogger so far... it sucks. can someone help me make it better?? #NoTrayIcon #include <misc.au3> guicreate("iLogger", 200, 400) guisetstate() $start = Guictrlcreatebutton("Start", -1, -1) while 1 $msg = GUIGetMsg() Select case ($msg = -3) Exit case ($msg = $start) guisetstate(@SW_HIDE) ; i had all of the hotkeysets here ie hotkeyset("a", "a") - hotkeyset("z", "z") and hotkeyset("^li", "Show") but it did not work? help EndSelect WEnd func space() send("{SPACE}") filewrite("log.txt", " ") EndFunc Func show() guisetstate(@sw_show) EndFunc func a() send("a") filewrite("log.txt", "a") EndFunc func B() send("b") filewrite("log.txt", "b") EndFunc func c() send("c") filewrite("log.txt", "c") EndFunc func d() send("d") filewrite("log.txt", "d") EndFunc func e() send("e") filewrite("log.txt", "e") EndFunc func f() send("f") filewrite("log.txt", "f") EndFunc func g() send("g") filewrite("log.txt", "g") EndFunc func h() send("h") filewrite("log.txt", "h") EndFunc func i() send("i") filewrite("log.txt", "i") EndFunc func j() send("j") filewrite("log.txt", "j") EndFunc func k() send("k") filewrite("log.txt", "k") EndFunc func l() send("l") filewrite("log.txt", "l") EndFunc func m() send("m") filewrite("log.txt", "m") EndFunc func n() send("n") filewrite("log.txt", "n") EndFunc func o() send("o") filewrite("log.txt", "o") EndFunc func p() send("p") filewrite("log.txt", "p") EndFunc func q() send("q") filewrite("log.txt", "q") EndFunc func r() send("r") filewrite("log.txt", "r") EndFunc func s() send("s") filewrite("log.txt", "s") EndFunc func t() send("t") filewrite("log.txt", "t") EndFunc func u() send("u") filewrite("log.txt", "u") EndFunc func v() send("v") filewrite("log.txt", "v") EndFunc func w() send("w") filewrite("log.txt", "w") EndFunc func x() send("x") filewrite("log.txt", "x") EndFunc func y() send("y") filewrite("log.txt", "y") EndFunc func z() send("z") filewrite("log.txt", "z") EndFunc
  23. oh, i feel like such an idiot!!!!
  24. how do i make a script that will do something if i press the "1" key or if i press the "j" key? i tried while 1 select case (guigetmsg() = "2") filewrite("haha", "sup", 1) endselect wend
  25. im making a backup program and i have two questions. 1 i have already made the script so that when the person clicks on the file, it displays in a read only edit. how do i make it so that the backup can read all of the locations specified on the edit? 2 how do i make it so that it would run every monday or every tuesday or at a specified time. thanks
×
×
  • Create New...