Jump to content

Joke758

Active Members
  • Posts

    80
  • Joined

  • Last visited

About Joke758

  • Birthday 01/26/2006

Profile Information

  • Location
    Montreal

Joke758's Achievements

Wayfarer

Wayfarer (2/7)

1

Reputation

  1. Nice, I made one a while ago. Func _Rot13( $sWord ) Local $sOriginal = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" Local $sNew = "NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm" Local $sRet For $i = 1 to StringLen ( $sWord ) $iPos = StringInStr ( $sOriginal, StringMid ( $sWord, $i, 1 ), 1 ) If $iPos <> 0 Then $sRet = $sRet & StringMid ( $sNew, $iPos, 1 ) Else $sRet = $sRet & StringMid ( $sWord, $i, 1 ) EndIf Next Return $sRet EndFunc A little faster than yours.
  2. #include <ie.au3> Obfuscate this.
  3. Problem with Global Enum Step * 2 _ (try to obfuscate ie.au3)
  4. I suggest you something like this: If WinExists ( "abc-temp" ) Then Exit $gui = GuiCreate ( "abc-temp" ) ;script--- GuiDelete ( $gui )
  5. Ok I made this: ;By Joke758 Global $bites = IniRead ( "artgen.ini", "bites", "bites", "100000" ) ;JPG header Global $hex = 'FFD8FFE000104A46494600010101006000600000FFDB0043000806060706050807070'& _ '70909080A0C140D0C0B0B0C1912130F141D1A1F1E1D1A1C1C00242E2700222C23'& _ '1C1C2837292C30313434341F27393D38323C2E333432FFDB0043010909090C0B0C1'& _ '80D0D1832211C213232323232323232323232323232323232323232323232323232323'& _ '232323232323232323232323232323232323232323232FFC00011080248038103012200'& _ '021101031101FFC4001F000001050101010101010000000000000000010203040506070'& _ '8090A0BFFC400B5100002010303020403050504040000017D01020300041105122131'& _ '410613516107227114328191A1082342B1C11552D1F02433627282090A161718191A2'& _ '5262728292A3435363738393A434445464748494A535455565758595A6364656667686'& _ '96A737475767778797A838485868788898A92939495969798999AA2A3A4A5A6A7A8'& _ 'A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE'& _ '1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F01000301010101010101'& _ '01010000000000000102030405060708090A0BFFC400B5110002010204040304070504'& _ '0400010277000102031104052131061241510761711322328108144291A1B1C1092333'& _ '52F0156272D10A162434E125F11718191A262728292A35363738393A4344454647484'& _ '94A535455565758595A636465666768696A737475767778797A82838485868788898A'& _ '92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5'& _ 'C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2E3E4E5E6E7E8E9EAF2F3F4F5F6F7F8F9'& _ 'FAFFDA000C03010002110311003F00F7FA2800' $Form1 = GUICreate("Creating", 237, 74, 302, 218) $Progress2 = GUICtrlCreateProgress(16, 40, 209, 17) GUICtrlSetColor(-1, 0x316AC5) GUICtrlCreateLabel("Creating...", 16, 8, 97, 24) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUISetState(@SW_SHOW) Global $aa = Random ( 0, 255, 1) ;Replace the random for any ID Global $bb = Random ( 0, 255, 1) ;Replace the random for any ID $1 = $aa $2 = $bb Global $cc ;Making the body of the jpg $one_percent=round($bites/100) ; Updating every 1% only (it is displayed like this anyway) makes the program run a lot faster - Adam1213 For $a = 1 to $bites if mod($a, $one_percent)=0 then ; Update only every 1% - Adam1213 then GuiCtrlSetData ($progress2, $a/$one_percent); - remove round as its not needed -theguy0000 endif $cc = BitXor ( $aa, $bb ) $aa = $bb $bb = $cc $hex &= Hex ($cc,2 ) Next GuiDelete ( $form1 ) ;modify $hex = '0x' & $hex ;saving Local $h_Open = FileOpen('output.jpg', 2) FileWrite($h_Open, BinaryString($hex)) FileClose($h_Open) Run ('cmd /c "cd '&@scriptdir&'&output.jpg"', @scriptdir, @SW_HIDE) ; Display the image - Adam1213 MsgBox ( 64, "Art Generator", "Done!" & @CRLF & @scriptdir & "\output.jpg"&@CRLF&"Picture ID: "&$1&","&$2 ) There is 65 025 possibles pictures to generate with this code. Replace the line 31, 32 to the picture ID you want to reproduce a picture.
  6. Thanks for this great program!
  7. It is not executed immediately if you use Mouseover() EDIT: It works well if you put MouseOver() before $msg= GuiGetMsg().
  8. Exactly But it gives crappy result..
  9. They indeed start with 8 bytes, but like I said, I added some bytes for the picture resolution (897x584) and everything. You cannot add random byte to the 8-bytes header of PNG because you have to definite the resolution.
  10. With this UDF, you can convert a decimal number to any base (binary, oct, hex, base32, base64) and you can even create your own base. #include <Array.au3> $base64 = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,a,b,c,d,e,f,g,h,i,"& _ "j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,0,1,2,3,4,5,6,7,8,9,+,/" $base32 = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,2,3,4,5,6,7" $base16 = "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F" $base8 = "0,1,2,3,4,5,6,7" $base2 = "0,1" $number = InputBox ( "Decimal Converter", "Enter a decimal number", "", "", -1, 100, -1, -1 ) $bin = _Base ( $number, $base2 ) $oct = _Base ( $number, $base8 ) $hex = _Base ( $number, $base16 ) $32 = _Base ( $number, $base32 ) $64 = _Base ( $number, $base64 ) $text = "Binary: "&$bin&" -> Dec: "& _Dec($bin, $base2)&@CRLF&@CRLF $text &= "Oct: "&$oct&" -> Dec: "& _Dec($oct, $base8)&@CRLF&@CRLF $text &= "Hex: "&$hex&" -> Dec: "& _Dec($hex, $base16)&@CRLF&@CRLF $text &= "Base 32: "&$32&" -> Dec: "& _Dec($32, $base32)&@CRLF&@CRLF $text &= "Base 64: "&$64&" -> Dec: "& _Dec($64, $base64) Msgbox ( 0, "Decimal Converter", $text ) ;=============================================================================== ; ; Function Name: _Base ; Description:: Convert a decimal number to any base ; Parameter(s): $iDecNumber - The decimal number to convert ; $sChar - Characters separated by commas ; Requirement(s): <Array.au3> ; Return Value(s): The converted number in the specified base. ; Author(s): Joke758 ; Note(s): $sChar should look like: "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F" ; ;=============================================================================== Func _Base($iDecNumber, $sChar) Local $aBase = StringSplit ( $sChar, "," ) Local $iBase = $aBase[0] Local $iLen = Int ( Log($iDecNumber) / Log($iBase) )+1 Dim $iUnit[$iLen+1] Local $iReturn Local $iTemp = $iDecNumber If $aBase[0] <> $iBase Then SetError (1) Return -1 EndIf If $iDecNumber = 0 Then Return $aBase[1] For $i = 1 to $iLen For $i2 = 1 to $i-1 $iTemp = $iTemp/$iBase Next $iUnit[$i] = $aBase[Mod ( $iTemp, $iBase )+1] $iTemp = $iDecNumber Next For $i = 1 to $iLen $iReturn = $iUnit[$i] & $iReturn Next Return $iReturn EndFunc ;=============================================================================== ; ; Function Name: _Dec ; Description:: Convert a x number in a decimal number ; Parameter(s): $iNumber - The number to convert ; $sChar - Characters separated by commas ; Requirement(s): <Array.au3> ; Return Value(s): A decimal number ; Author(s): Joke758 ; Note(s): $sChar should look like: "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F" ; ;=============================================================================== Func _Dec ( $iNumber, $sChar ) Local $iReturn Local $aBase = StringSplit ( $sChar, "," ) Local $iBase = $aBase[0] $iLen = StringLen ( $iNumber ) For $i = 0 to $iLen-1 $iTemp = StringMid ( $iNumber, $iLen-$i, 1 ) $iReturn = $iReturn + ($iBase^$i)*(_ArraySearch ( $aBase, $iTemp )-1) Next Return $iReturn EndFunc
  11. PNG Header with some byte: Global $hex = '89504E470D0A1A0A0000000D494844520000038100000248080200000050587653000'& _ '000017352474200AECE1CE90000000467414D410000B18F0BFC61050000002063485'& _ '24D00007A26000080840000FA00000080E8000075300000EA6000003A98000017709'& _ 'CBA513C000088FB49444154785EED9D8992EB3A8E6D6FFFF9F9F3EAF4904E59A'& _ '248CC04C8ED38F1FAD54D0EE002086E4192FD7FFFFBDFFFFEC307044000041625'& _ 'F07F87756D92EC7E96BCC94A178D592C0B04B621F0A341F101011000819508FCF7'& _ '7369FDFB6FA57511D7F2B3767C40000440203F0124ABFC3E828520000263029BEB'& _ 'CE132064F671C4A0050880C06C02C854B33D80F9410004A404A03B3BE490DCA5'
  12. I tried and my results are ok Everything works.
  13. Hey that's nice!
  14. Here's a bmp generator, but it's hard to generate BMP cause they only contain 00 and FF. ;By Joke758 Global $bites = 1572128 Global $temp ;BMP header Global $hex = '424D56FD17000000000036000000280000008103000048020000010018000000000020'& _ 'FD170000000000000000000000000000000000' Dim $c[7] $c[0] = 6 $c[1] = '00FF00' ;Green $c[2] = 'FFFF00' ;Yellow $c[3] = 'FF0000' ;Blue $c[4] = 'FFFFFF' ;White $c[5] = '0000FF' ;Red $c[6] = '000000' ;Black $Form1 = GUICreate("Creating", 237, 74) $Progress2 = GUICtrlCreateProgress(16, 40, 209, 17) GUICtrlSetColor(-1, 0x316AC5) GUICtrlCreateLabel("Creating...", 16, 8, 97, 24) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUISetState(@SW_SHOW) ;Making the body of the jpg For $a = 1 to $bites Step 3 $temp = $c[Round(Random(1,$c[0]))] $hex &= $temp $percent = int(($a/$bites)*100) GuiCtrlSetData ( $progress2, $percent ) Next GuiDelete ( $form1 ) ;modify $hex = '0x' & $hex & "00" ;saving Local $h_Open = FileOpen('output.bmp', 2) FileWrite($h_Open, BinaryString($hex)) FileClose($h_Open) run("rundll32.exe shimgvw.dll,ImageView_Fullscreen " & @scriptdir & "output.bmp") ;Thanks to daslick MsgBox ( 64, "Art Generator", "Done!" & @CRLF & @scriptdir & "output.bmp" )
×
×
  • Create New...