Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Encrypt, embeding file in jpeg thing, hard disk space monitor


  • Please log in to reply
17 replies to this topic

#1 Jex

Jex

    Polymath

  • Active Members
  • PipPipPipPip
  • 206 posts

Posted 24 October 2007 - 03:53 PM

My little programs :

Posted Image

AutoIt         
#include <GUIConstants.au3> #include <STRING.AU3> #include <Process.au3> Global $text, $password, $text2 $Form1_1 = GUICreate("FLEXY", 408, 305, 326, 434) $Group1 = GUICtrlCreateGroup("Encrypt / Decrypt", 16, 8, 377, 121) $Input1 = GUICtrlCreateInput("", 64, 32, 121, 21) $Input2 = GUICtrlCreateInput("", 256, 32, 121, 21) $Label1 = GUICtrlCreateLabel("Text :", 24, 36, 31, 17) $Label2 = GUICtrlCreateLabel("Password :", 192, 36, 56, 17) $Input3 = GUICtrlCreateInput("", 64, 64, 313, 21) $Label3 = GUICtrlCreateLabel("Result :", 24, 68, 40, 17) $Button1 = GUICtrlCreateButton("Encrypt", 24, 96, 65, 25, 0) $Button2 = GUICtrlCreateButton("Decrypt", 88, 96, 65, 25, 0) $Button3 = GUICtrlCreateButton("Copy Result", 152, 96, 73, 25, 0) $Checkbox1 = GUICtrlCreateCheckbox("Remove Text", 296, 100, 89, 17) GUICtrlSetTip(-1, "Remove text after Encrypt/Decrypt") $Button4 = GUICtrlCreateButton("Reset", 224, 96, 57, 25, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("Embeding compressed file in JPG file", 16, 136, 377, 153) $config = GUICtrlCreateInput("", 96, 160, 281, 21) $configbutton = GUICtrlCreateButton("Picture file :", 24, 160, 65, 21, 0) $comp = GUICtrlCreateInput("", 120, 192, 257, 21) $compbutton = GUICtrlCreateButton("Compressed file :", 24, 192, 89, 21, 0) $output = GUICtrlCreateInput("", 104, 224, 273, 21) $outputbutton = GUICtrlCreateButton("Output JPG :", 24, 224, 75, 21, 0) $ok = GUICtrlCreateButton("Embed in JPG file", 24, 256, 99, 25, 0) $Label4 = GUICtrlCreateLabel("Status : Ready.", 136, 260, 243, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) While 1     $msg = GUIGetMsg()     Select         Case $msg = $GUI_EVENT_CLOSE             Exit         Case $msg = $Button1             beforecrypt()             $Cryped = crypt($text, $password, 0)             GUICtrlSetData($Input3, $Cryped)             If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then GUICtrlSetData($Input1, "")         Case $msg = $Button2             beforecrypt()             $Decrypt = crypt($text2, $password, 1)             GUICtrlSetData($Input3, $Decrypt)             If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then GUICtrlSetData($Input1, "")         Case $msg = $Button3             $clip = StringFormat(GUICtrlRead($Input3))             ClipPut($clip)         Case $msg = $Button4             GUICtrlSetData($Input1, "")             GUICtrlSetData($Input2, "")             GUICtrlSetData($Input3, "")         Case $msg = $configbutton             $configfilename = FileOpenDialog('Please choose the Picture file...', '', 'Picture files (*.jpg)|All files (*.*)', 1 + 4)             If @error <> 1 Then GUICtrlSetData($config, $configfilename)         Case $msg = $compbutton             $compfilename = FileOpenDialog('Please choose the Compressed file...', '', 'Compressed files (*.7z;*.rar;*.zip)|All files (*.*)', 1 + 4)             GUICtrlSetData($comp, $compfilename)         Case $msg = $outputbutton             $outfilename = FileSaveDialog('Please choose your output JPG file...', '', 'JPG files (*.jpg)|All files (*.*)', 1 + 4)             If $outfilename <> "" Then                 $outfilename = $outfilename & ".jpg"                 GUICtrlSetData($output, $outfilename)             EndIf         Case $msg = $ok             If (StringLen(GUICtrlRead($config)) == 0) Then                 MsgBox(0, "Picture file", "Picture file must be chosen!")             ElseIf (StringLen(GUICtrlRead($comp)) == 0) Then                 MsgBox(0, "Compressed file", "Compressed file must be chosen!")             ElseIf (StringLen(GUICtrlRead($output)) == 0) Then                 MsgBox(0, "Output JPG", "Output JPG must be chosen!")             Else                 $realoutput = GUICtrlRead($output)                 _RunDOS('copy /b ' & '"' & $configfilename & '"' & ' + ' & '"' & $compfilename & '" ' & '"' & $realoutput & '"')                 If @error = 0 Then                     GUICtrlSetData($Label4, "Status : JPEG file created.")                 Else                     GUICtrlSetData($Label4, "Status : Error.")                 EndIf             EndIf     EndSelect WEnd Func beforecrypt()     $text = GUICtrlRead($Input1)     $password = GUICtrlRead($Input2)     $text2 = $text EndFunc   ;==>beforecrypt Func crypt($t, $pw, $type)     If $type = 1 Then $t = _HexToString($t)     $Terug = ""     $pwlen = StringLen($password)     $textlen = StringLen($t)     Dim $text[$textlen + 1]     For $z = 1 To $pwlen         For $i = 1 To $textlen             $text[$i] = Hex(BitXOR(Asc(StringMid($t, $i, 1)), Asc(StringMid($pw, $z, 1))), 2)         Next     Next     For $i = 1 To UBound($text) - 1         If $type = 1 Then $Terug &= Chr(Dec($text[$i]))         If $type <> 1 Then $Terug &= $text[$i]     Next     Return $Terug EndFunc   ;==>cryptƒo݊÷ Ù«­¢+؍¥¹±Õ‘”€™±ÐíU% ½¹Íх¹Ñ̹…Ô̙Ðì()±½‰…°€˜ŒÀÌØíQ½Ñ…±‘¥Í¬°€˜ŒÀÌØíɕ•‘¥Í¬°€˜ŒÀÌØíA•É‘¥Í¬°€˜ŒÀÌØí¥Í­Ì°€˜ŒÀÌØíA½Ì€ô€´ÄÔ°€˜ŒÀÌØí1…‰•±lÄÁt°€˜ŒÀÌØíAɽÉ•ÍÍlÄÁt°€˜ŒÀÌØí¥ÉÍЀôQÉՔ°€˜ŒÀÌØí  ÕÑѽ¸°€˜ŒÀÌØí ½Á䰀˜ŒÀÌØíQ¥µ•È()!…É‘‘¥Í¬ ¤()]¡¥±”€Ä($˜ŒÀÌØí    •¥¸€ôQ¥µ•É%¹¥Ð ¤($˜ŒÀÌØí¹5͜€ôU%•Ñ5͜ ¤(%Mݥэ €˜ŒÀÌØí¹5͜($% …Í”€˜ŒÀÌØíU%}Y9Q} 1=M($$%á¥Ð($% …Í”€˜ŒÀÌØí    ÕÑѽ¸($$% ±¥ÁAÕÐ ˜ŒÀÌØí ½Áä¤(%¹‘Mݥэ (%}Q¥µ•È€ ˜ŒÀÌØí    •¥¸°€Ô°€™ÅÕ½Ðí!…É‘‘¥Í¬™ÅÕ½Ðì¤)]¹()Õ¹Œ!…É‘‘¥Í¬ ¤($˜ŒÀÌØí¥Í­Ì€ôɥٕ•Ñɥٔ ™ÅÕ½Ðí¥á•™ÅÕ½Ðì¤(%%˜€˜ŒÀÌØí¥ÉÍЀôQÉՔQ¡•¸ ɕ…Ñ•™½É´ ˜ŒÀÌØí¥Í­ÍlÁt¤($˜ŒÀÌØí ½Áä€ô€™ÅÕ½Ðì™ÅÕ½Ðì($˜ŒÀÌØí±±Ñ½Ñ…±‘¥Í¬€ô€™ÅÕ½Ðì™ÅÕ½Ðì($˜ŒÀÌØí±±™É••‘¥Í¬€ô€™ÅÕ½Ðì™ÅÕ½Ðì(%½È€˜ŒÀÌØí¤€ô€ÄQ¼€˜ŒÀÌØí¥Í­ÍlÁt($% ¡•­!…É‘‘¥Í¬ ˜ŒÀÌØí¤¤($$˜ŒÀÌØí…Ñ„€ô€˜ŒÀÌØí¥Í­Íl˜ŒÀÌØí¥t€™…µÀ쀙ÅÕ½Ð쀙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØíɕ•‘¥Í¬€™…µÀ쀙ÅÕ½Ð흈€¼€™ÅÕ½Ð쀙…µÀ쀘ŒÀÌØíQ½Ñ…±‘¥Í¬€™…µÀ쀙ÅÕ½Ð흈€ €™ÅÕ½Ð쀙…µÀ쀘ŒÀÌØíA•É‘¥Í¬€™…µÀ쀙ÅÕ½Ð씀¤™ÅÕ½Ðì($%]ɥє ˜ŒÀÌØí…Ñ„¤($% ɕ…Ñ•Õ¤ ˜ŒÀÌØí…Ñ„°€˜ŒÀÌØí¤¤($$˜ŒÀÌØí±±Ñ½Ñ…±‘¥Í¬€¬ô€˜ŒÀÌØíQ½Ñ…±‘¥Í¬($$˜ŒÀÌØí±±™É••‘¥Í¬€¬ô€˜ŒÀÌØíɕ•‘¥Í¬(%9•áÐ($˜ŒÀÌØíA•É‘¥Í¬€ôI½Õ¹  ˜ŒÀÌØí±±™É••‘¥Í¬€¼€˜ŒÀÌØí±±Ñ½Ñ…±‘¥Í¬¤€¨€ÄÀÀ°€È¤($˜ŒÀÌØí…Ñ„€ô€™ÅÕ½ÐíQ½Ñ…°ÍÁ…”耙ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí±±™É••‘¥Í¬€™…µÀ쀙ÅÕ½Ð흈€¼€™ÅÕ½Ð쀙…µÀ쀘ŒÀÌØí±±Ñ½Ñ…±‘¥Í¬€™…µÀ쀙ÅÕ½Ð흈€ €™ÅÕ½Ð쀙…µÀ쀘ŒÀÌØíA•É‘¥Í¬€™…µÀ쀙ÅÕ½Ð씀¤™ÅÕ½Ðì(%]ɥє ˜ŒÀÌØí…Ñ„¤(% ɕ…Ñ•Õ¤ ˜ŒÀÌØí…Ñ„°€˜ŒÀÌØí¥Í­ÍlÁt€¬€Ä¤)¹‘Õ¹Œ€€€ìôô™Ðí!…É‘‘¥Í¬()Õ¹Œ ¡•­!…É‘‘¥Í¬ ˜ŒÀÌØí¥Í¬¤($˜ŒÀÌØíQ½Ñ…±‘¥Í¬€ôI½Õ¹¡ɥٕMÁ…•Q½Ñ…° ˜ŒÀÌØí¥Í­Íl˜ŒÀÌØí¥Í­t¤€¼€ÄÀÈа€È¤($˜ŒÀÌØíɕ•‘¥Í¬€ôI½Õ¹¡ɥٕMÁ…•ɕ” ˜ŒÀÌØí¥Í­Íl˜ŒÀÌØí¥Í­t¤€¼€ÄÀÈа€È¤($˜ŒÀÌØíA•É‘¥Í¬€ôI½Õ¹  ˜ŒÀÌØíɕ•‘¥Í¬€¼€˜ŒÀÌØíQ½Ñ…±‘¥Í¬¤€¨€ÄÀÀ°€È¤)¹‘Õ¹Œ€€€ìôô™Ðí ¡•­!…É‘‘¥Í¬()Õ¹Œ ɕ…Ñ•™½É´ ˜ŒÀÌØíM¥é”¤($˜ŒÀÌØí½É´€ôU% ɕ…Ñ” ™ÅÕ½Ðí1ad™ÅÕ½Ð찀ÌÌÀ°€ ˜ŒÀÌØíM¥é”€¨€ÔÀ¤€¬€ÄÀÀ°€ÌÐÀ°€ÌØĤ($˜ŒÀÌØí  ÕÑѽ¸€ôU% Ñɱ ɕ…Ñ•  ÕÑѽ¸ ™ÅÕ½Ðí ½ÁäÑ¼±¥Á‰½…ɐ™ÅÕ½Ð찀ఀ ˜ŒÀÌØíM¥é”€¨€ÔÀ¤€¬€ØÔ°€ÄÄÌ°€ÈÔ°€À¤($˜ŒÀÌØí¥ÉÍЀô…±Í”(%U%M•ÑMхє¡M]}M!=¤)¹‘Õ¹Œ€€€ìôô™Ðí ɕ…Ñ•™½É´()Õ¹Œ ɕ…Ñ•Õ¤ ˜ŒÀÌØí…Ñ„°€˜ŒÀÌØí¤¤(%%˜U% ÑɱI•… ˜ŒÀÌØí1…‰•±l˜ŒÀÌØí¥t¤€ô€™ÅÕ½Ðì™ÅÕ½ÐìQ¡•¸($$˜ŒÀÌØíA½Ì€¬ô€ÈÔ($$˜ŒÀÌØí1…‰•±l˜ŒÀÌØí¥t€ôU% Ñɱ ɕ…Ñ•1…‰•° ˜ŒÀÌØí…Ñ„°€à°€˜ŒÀÌØíA½Ì°€ÌÄÔ°€Äܤ($$˜ŒÀÌØíA½Ì€¬ô€ÈÔ($$˜ŒÀÌØíAɽÉ•ÍÍl˜ŒÀÌØí¥t€ôU% Ñɱ ɕ…Ñ•AɽÉ•ÍÌ à°€˜ŒÀÌØíA½Ì°€ÌÄÌ°€Äܤ($$˜ŒÀÌØíA•É‘¥Í¬€ô€ÄÀÀ€´€˜ŒÀÌØíA•É‘¥Í¬($%U% ÑɱM•Ñ…Ñ„ ´Ä°€˜ŒÀÌØíA•É‘¥Í¬¤(%±Í”($%U% Ñɱ•±•Ñ” ˜ŒÀÌØí1…‰•±l˜ŒÀÌØí¥t¤($$˜ŒÀÌØíA½Ì€¬ô€ÈÔ($$˜ŒÀÌØí1…‰•±l˜ŒÀÌØí¥t€ôU% Ñɱ ɕ…Ñ•1…‰•° ˜ŒÀÌØí…Ñ„°€à°€˜ŒÀÌØíA½Ì°€ÌÄÔ°€Äܤ($%U% Ñɱ•±•Ñ” ˜ŒÀÌØíAɽÉ•ÍÍl˜ŒÀÌØí¥t¤($$˜ŒÀÌØíA½Ì€¬ô€ÈÔ($$˜ŒÀÌØíAɽÉ•ÍÍl˜ŒÀÌØí¥t€ôU% Ñɱ ɕ…Ñ•AɽÉ•ÍÌ à°€˜ŒÀÌØíA½Ì°€ÌÄÌ°€Äܤ($$˜ŒÀÌØíA•É‘¥Í¬€ô€ÄÀÀ€´€˜ŒÀÌØíA•É‘¥Í¬($%U% ÑɱM•Ñ…Ñ„ ´Ä°€˜ŒÀÌØíA•É‘¥Í¬¤(%¹‘%˜(%%˜€˜ŒÀÌØí¤€™Ð쀘ŒÀÌØí¥Í­ÍlÁtQ¡•¸($$˜ŒÀÌØíA½Ì€ô€´ÄÔ(%¹‘%˜)¹‘Õ¹Œ€€€ìôô™Ðí ɕ…Ñ•Õ¤()Õ¹Œ]ɥє ˜ŒÀÌØí…Ñ„¤(%%˜€˜ŒÀÌØí ½Áä€ô€™ÅÕ½Ðì™ÅÕ½ÐìQ¡•¸($$˜ŒÀÌØí ½Áä€ô€˜ŒÀÌØí…Ñ„(%±Í”($$˜ŒÀÌØí ½Áä€ô€˜ŒÀÌØí ½Á䀙…µÀì I1€™…µÀ쀘ŒÀÌØí…Ñ„(%¹‘%˜)¹‘Õ¹Œ€€€ìôô™Ðí]ɥє()Õ¹Œ}Q¥µ•È ˜ŒÀÌØíY…È°˜ŒÀÌØíM•Œ°˜ŒÀÌØíÕ¹Œ¤($˜ŒÀÌØíQ¥µ•É¥™˜€ôQ¥µ•É¥™˜ ˜ŒÀÌØíY…Ȥ($˜ŒÀÌØíQ¥µ•È€¬ô€˜ŒÀÌØíQ¥µ•É¥™˜€¼€ÄÀÀÀ(%%˜€˜ŒÀÌØíQ¥µ•È€™Ð쀘ŒÀÌØíM•ŒQ¡•¸($$˜ŒÀÌØíQ¥µ•È€ô€À($% …±° ˜ŒÀÌØíÕ¹Œ¤(%¹‘%˜)¹‘Õ¹

Edited by Jex, 24 October 2007 - 03:54 PM.








#2 JohnBailey

JohnBailey

    Scripter

  • Active Members
  • PipPipPipPipPipPip
  • 943 posts

Posted 24 October 2007 - 04:35 PM

I appreciate the pictures at the beginning of your example thread posts.

What does embedding a compressed file in a jpg do?
Answer: http://lifehacker.com/software/how-to/hide...ages-282119.php

Edited by JohnBailey, 24 October 2007 - 04:45 PM.

A decision is a powerful thing

#3 Zcubed

Zcubed

    Seeker

  • New Members
  • 1 posts

Posted 24 October 2007 - 04:43 PM

Nice! I am learning how to setup a GUI and I am learning a bunch from your scripts! Thanks

#4 gseller

gseller

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,057 posts

Posted 25 October 2007 - 06:19 AM

Yes, I am really enjoying learning from these scripts.. Keep em coming. Thanx!

#5 Jex

Jex

    Polymath

  • Active Members
  • PipPipPipPip
  • 206 posts

Posted 29 October 2007 - 05:06 PM

I'm added my Progress Bar, Zedna's gradient background and additional hard disk space informations.

Example "Copy to clipboard" :
C: 9.32gb ( 9.53% ) / 88.43gb ( 90.47% ) / 97.75gb
D: 19.82gb ( 20.28% ) / 77.93gb ( 79.72% ) / 97.75gb
E: 1.86gb ( 1.9% ) / 95.89gb ( 98.1% ) / 97.75gb
F: 0.09gb ( 0.09% ) / 97.66gb ( 99.91% ) / 97.75gb
G: 0.15gb ( 0.2% ) / 74.58gb ( 99.8% ) / 74.73gb
J: 94.07gb ( 91.74% ) / 8.47gb ( 8.26% ) / 102.54gb
K: 58.32gb ( 78.26% ) / 16.2gb ( 21.74% ) / 74.52gb
L: 80.89gb ( 96.57% ) / 2.87gb ( 3.43% ) / 83.76gb
Total: 264.52gb ( 36.41% ) / 462.03gb ( 63.59% ) / 726.55gb

Posted Image

AutoIt         
#include <GUIConstants.au3> #include <Color.au3> Global $Diskletter, $Totaldisk, $Freedisk, $Fulldisk, $Percfreedisk, $Percfulldisk, $Disks, $Pos = -15, $Label[10], $Bar[10], $First = True, $Button, $Copy, $Timer Harddisk() While 1     $Begin = TimerInit()     $msg = GUIGetMsg()     Switch $msg         Case $GUI_EVENT_CLOSE             Exit         Case $Button             ClipPut($Copy)     EndSwitch     _Timer ($Begin, 5, "Harddisk") WEnd Func Harddisk()     $Disks = DriveGetDrive("Fixed")     If $First = True Then Createform($Disks[0])     $Copy = ""     $Alltotaldisk = ""     $Allfreedisk = ""     $Allfulldisk = ""     For $i = 1 To $Disks[0]         CheckHarddisk($i)         $Data = $Diskletter & " " & $Fulldisk & "gb ( " & $Percfulldisk & "% ) / " & $Freedisk & "gb ( " & $Percfreedisk & "% ) / " & $Totaldisk & "gb"         Write($Data)         Creategui($Data, $i)         $Alltotaldisk += $Totaldisk         $Allfreedisk += $Freedisk         $Allfulldisk += $Fulldisk     Next     $Percfreedisk = Round(($Allfreedisk / $Alltotaldisk) * 100, 2)     $Percfulldisk = Round(100 - $Percfreedisk, 2)     $Data = "Total: " & $Allfulldisk & "gb ( " & $Percfulldisk & "% ) / " & $Allfreedisk & "gb ( " & $Percfreedisk & "% ) / " & $Alltotaldisk & "gb"     Write($Data)     Creategui($Data, $Disks[0] + 1) EndFunc   ;==>Harddisk Func CheckHarddisk($Disk)     $Diskletter = StringUpper($Disks[$Disk])     $Totaldisk = Round(DriveSpaceTotal($Disks[$Disk]) / 1024, 2)     $Freedisk = Round(DriveSpaceFree($Disks[$Disk]) / 1024, 2)     $Fulldisk = Round($Totaldisk - $Freedisk, 2)     $Percfreedisk = Round(($Freedisk / $Totaldisk) * 100, 2)     $Percfulldisk = Round(100 - $Percfreedisk, 2) EndFunc   ;==>CheckHarddisk Func Createform($Size)     $Form = GUICreate("FLEXY", 330, ($Size * 50) + 100, @DesktopWidth / 3, 100)     $Button = GUICtrlCreateButton("Copy to clipboard", 8, ($Size * 50) + 65, 113, 25, 0)     $First = False     $Formsize = WinGetClientSize($Form)     _GUICtrlCreateGradient("0x000000", "0x0000FF", 0, 0, $Formsize[0], $Formsize[1])     GUISetState(@SW_SHOW) EndFunc   ;==>Createform Func Creategui($Data, $i)     If GUICtrlRead($Label[$i]) = "" Then         $Pos += 25         $Label[$i] = GUICtrlCreateLabel($Data, 8, $Pos, 315, 17)         GUICtrlSetColor(-1, 0xffffff)         GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)         $Pos += 25         $Bar[$i] = CreateProgressBar(8, $Pos, 313, 17)         SetProgressBar($Bar[$i], $Percfulldisk)     Else         GUICtrlDelete($Label[$i])         $Pos += 25         $Label[$i] = GUICtrlCreateLabel($Data, 8, $Pos, 315, 17)         GUICtrlSetColor(-1, 0xffffff)         GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)         DeleteProgressBar($Bar[$i])         $Pos += 25         $Bar[$i] = CreateProgressBar(8, $Pos, 313, 17)         SetProgressBar($Bar[$i], $Percfulldisk)     EndIf     If $i > $Disks[0] Then         $Pos = -15     EndIf EndFunc   ;==>Creategui Func Write($Data)     If $Copy = "" Then         $Copy = $Data     Else         $Copy = $Copy & @CRLF & $Data     EndIf EndFunc   ;==>Write Func _Timer($Var,$Sec,$Func)     $TimerDiff = TimerDiff($Var)     $Timer += $TimerDiff / 1000     If $Timer > $Sec Then         $Timer = 0         Call($Func)     EndIf EndFunc Func CreateProgressBar($Left,$Top,$Width,$Height,$Color1 = 0x00FF00,$Color2 = 0xFF0000)     $ProgressBar = GUICtrlCreateGraphic($Left, $Top, $Width, $Height, $WS_BORDER)     $ProgressBar2 = GUICtrlCreateGraphic($Left + 1, $Top + 1, $Width - 2, $Height - 2)     GUICtrlSetBkColor($ProgressBar, $Color1)     GUICtrlSetBkColor($ProgressBar2, $Color2)     Dim $Progress[8]     $Progress[0] = $ProgressBar2     $Progress[1] = $Left     $Progress[2] = $Top     $Progress[3] = $Width     $Progress[4] = $Height     $Progress[5] = $Color1     $Progress[6] = $Color2     $Progress[7] = $ProgressBar     Return $Progress EndFunc Func SetProgressBar($Progress,$Percentage)     If $Percentage < 1 Then         GUICtrlSetBkColor($Progress[0],$Progress[5])     Else         GUICtrlSetBkColor($Progress[0],$Progress[6])         GUICtrlSetPos($Progress[0], $Progress[1] + 1, $Progress[2] + 1, (($Progress[3] - 2) / 100) * $Percentage - 1, $Progress[4] - 2)     EndIf EndFunc Func DeleteProgressBar($Progress)     GUICtrlDelete($Progress[0])     GUICtrlDelete($Progress[7]) EndFunc Func _GUICtrlCreateGradient($nStartColor, $nEndColor, $nX, $nY, $nWidth, $nHeight)     Local $color1R = _ColorGetRed($nStartColor)     Local $color1G = _ColorGetGreen($nStartColor)     Local $color1B = _ColorGetBlue($nStartColor)     Local $nStepR = (_ColorGetRed($nEndColor) - $color1R) / $nHeight     Local $nStepG = (_ColorGetGreen($nEndColor) - $color1G) / $nHeight     Local $nStepB = (_ColorGetBlue($nEndColor) - $color1B) / $nHeight     GuiCtrlCreateGraphic($nX, $nY, $nWidth, $nHeight)     For $i = 0 To $nHeight - $nY         $sColor = "0x" & StringFormat("%02X%02X%02X", $color1R+$nStepR*$i, $color1G+$nStepG*$i, $color1B+$nStepB*$i)         GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $sColor, 0xffffff)         GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, $i)         GUICtrlSetGraphic(-1, $GUI_GR_LINE, $nWidth, $i)     Next EndFunc

Edited by Jex, 29 October 2007 - 05:08 PM.


#6 gseller

gseller

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,057 posts

Posted 30 October 2007 - 06:16 AM

Cool!! I like the color...

#7 Creator

Creator

    Adventurer

  • Active Members
  • PipPip
  • 129 posts

Posted 30 October 2007 - 08:53 AM

This is really cool!

One question though....how can i get my compressed file back out of the jpeg once embedded??

-edit- oooh well...eerhm...duh...shame shame.... :"> ok i didnt get it acts as an archive after embedding...so my winrar sees all the files in the jpgeg... absolutely briliant!!!

Edited by Creator, 30 October 2007 - 09:11 AM.


#8 Roofel

Roofel

    Wayfarer

  • Active Members
  • Pip
  • 74 posts

Posted 22 December 2007 - 11:13 AM

Excellent mate:) I used a few fragments of your script to make my own(Adding more features to the window). If i ever put it out, your in the credits:P
Never argue with an idiot, he will just bring you down to his own level and beat you with experience! :D

#9 Jex

Jex

    Polymath

  • Active Members
  • PipPipPipPip
  • 206 posts

Posted 22 December 2007 - 03:11 PM

Excellent mate:) I used a few fragments of your script to make my own(Adding more features to the window). If i ever put it out, your in the credits:P


Not need credits because im used other peoples scripts too for make my own :)

#10 Roofel

Roofel

    Wayfarer

  • Active Members
  • Pip
  • 74 posts

Posted 22 December 2007 - 04:04 PM

Well:P still put you in the creditsxD
Never argue with an idiot, he will just bring you down to his own level and beat you with experience! :D

#11 microsoft

microsoft

    Wayfarer

  • Active Members
  • Pip
  • 67 posts

Posted 24 December 2007 - 02:23 PM

thanks, :)

how to Decrypt zip After Encrypt on JPG Image ?

#12 Jex

Jex

    Polymath

  • Active Members
  • PipPipPipPip
  • 206 posts

Posted 24 December 2007 - 08:06 PM

My Winrar not english for that reason i can't send ss but you need open your Zip program ( Winrar, Winzip etc. ) and later open your image and extract.

#13 James

James

    Universalist

  • MVPs
  • 10,353 posts

Posted 15 February 2008 - 08:20 PM

Sorry to bring up an old topic but I was looking through your scripts :)

How does this work, any instructions?

#14 Jex

Jex

    Polymath

  • Active Members
  • PipPipPipPip
  • 206 posts

Posted 15 February 2008 - 08:47 PM

If you are asking embeding file thing then :

In picture file box write your picture place ( You need select image file )
In compressed file box write your crompressed file place ( You need compressed file for embed in jpg )
And in output jpg file box write your save place ( Example C:\test.jpg )

After this image create you need extract this image for reach your compressed file.
With that method you can upload your files to any image host site. ( example imageshack.us not allow other formats for upload, you can only upload image files but if you embed your file in jpg file then you can upload your image and later you can save this image and extract )

Edited by Jex, 15 February 2008 - 08:49 PM.


#15 SxyfrG

SxyfrG

    Adventurer

  • Active Members
  • PipPip
  • 129 posts

Posted 16 February 2008 - 10:28 AM

Just made my own version of your file embedder using your code, but in a different layout. With a few extra functions of course :)

AutoIt         
;Made by SxýfrG, based on the work by Jex at <a href='http://www.autoitscript.com' class='bbc_url' title=''>http://www.autoitscript.com</a> #include <GUIConstants.au3> #include <Process.au3> #include <GuiListView.au3> #NoTrayIcon Opt("GUIOnEventMode",1) GUICreate ( "Embedder" , 500 , 300 ) GUICtrlCreateGroup ( "Embed A Compressed Archive Within Another File - Thanks Jex" , 10 , 10 , 480 , 130  ) ;buttons------------- $ButtonPic    = GUICtrlCreateButton ( "Input File:" , 20 , 30 , 90 , 26 ) $ButtonArc    = GUICtrlCreateButton ( "Archive File:" , 20 , 65 , 90 , 26 ) $ButtonOut    = GUICtrlCreateButton ( "Output File:" , 20 , 100 , 90 , 26 ) $ButtonCreate = GUICtrlCreateButton ( "Create!" , 385 , 65 , 90 , 26 ) $ButtonClear  = GUICtrlCreateButton ( "Clear List" , 385 , 100 , 90 , 26 ) ;inputs-------------- $InputPic     = GUICtrlCreateInput ( "" , 120 , 33 , 250 , 20 , BitOR ( $ES_READONLY , $ES_AUTOHSCROLL ) ) $InputArc     = GUICtrlCreateInput ( "" , 120 , 68 , 250 , 20 , BitOR ( $ES_READONLY , $ES_AUTOHSCROLL ) ) $InputOut     = GUICtrlCreateInput ( "" , 120 , 103 , 250 , 20 , BitOR ( $ES_READONLY , $ES_AUTOHSCROLL ) ) ;setonevents--------- $Edit         = GUICtrlCreateListView ( "Items" , 20 , 150 , 460 , 140 ) _GUICtrlListView_SetColumnWidth ( $Edit , 0 , 450 ) GUISetOnEvent ( $GUI_EVENT_CLOSE , "Exitt" ) GUICtrlSetOnEvent ( $ButtonPic , "Pic" ) GUICtrlSetOnEvent ( $ButtonArc , "Arc" ) GUICtrlSetOnEvent ( $ButtonOut , "Out" ) GUICtrlSetOnEvent ( $ButtonCreate , "Create" ) GUICtrlSetOnEvent ( $ButtonClear , "Clear" ) ;misc---------------- GUISetState ( @SW_SHOW ) $Ini = IniRead ( @ScriptDir & "\config.ini" , "Embedder" , "Items" , "N" ) If $Ini = "N" Then     IniWrite ( @ScriptDir & "\config.ini" , "Embedder" , "Items" , "1" )     IniWrite ( @ScriptDir & "\config.ini" , "Embedder" , "Names" , "Items:" ) Else     $Inir = IniRead ( @ScriptDir & "\config.ini" , "Embedder" , "Names" , "N" )     $InirSplit = StringSplit ( $Inir , "|" )     For $i = 2 To $Ini Step 1         $Out = GUICtrlCreateListViewItem ( "|" , $Edit )         GUICtrlSetData ( $Out , $InirSplit[$i] )     Next EndIf While 1     Sleep (1000) WEnd ;functions----------- Func Clear()     IniDelete ( @ScriptDir & "\config.ini" , "Embedder" )     GUICtrlDelete ( $Edit )     IniWrite ( @ScriptDir & "\config.ini" , "Embedder" , "Items" , "1" )     IniWrite ( @ScriptDir & "\config.ini" , "Embedder" , "Names" , "Items:" )     $Edit         = GUICtrlCreateListView ( "Items" , 20 , 150 , 460 , 140 ) _GUICtrlListView_SetColumnWidth ( $Edit , 0 , 450 ) $Ini = IniRead ( @ScriptDir & "\config.ini" , "Embedder" , "Items" , "N" ) $Inir = IniRead ( @ScriptDir & "\config.ini" , "Embedder" , "Names" , "N" )     $InirSplit = StringSplit ( $Inir , "|" )     For $i = 2 To $Ini Step 1         $Out = GUICtrlCreateListViewItem ( "|" , $Edit )         GUICtrlSetData ( $Out , $InirSplit[$i] )     Next EndFunc Func Pic()     $PicFile = FileOpenDialog ( "Please Choose The Picture File", "", "All files (*.*)|Executables (*.exe;*.com;*.pif)|Libraries and ActiveX controls (*.dll;*.ocx;*.dpl;*.bpl)|Picture Files (*.jpg;*.bmp;*.tif)|Music Files (*.mp3;*.wav;*.wma;*.flac)|Video Files (*.wmv;*.avi;*.flv)|Text Documents (*.txt;*.doc;*.rtf)" , 5 )     If Not @Error = 1 Then GUICtrlSetData ( $InputPic , $PicFile ) EndFunc Func Arc()     $ArcFile = FileOpenDialog ( "Please Choose The Archive File" , "" , "Archive Files (*.zip;*.7z;*.rar;*.tar;*.gz.tar;*.cab;*.iso;*.z;*.ace;*.arj;*.bz2)|All files (*.*)" , 5 )     If Not @Error = 1 Then GUICtrlSetData ( $InputArc , $ArcFile ) EndFunc Func Out()     $OutFile = FileSaveDialog ( "Please Enter the Output Picture Filename" , "" , "All files (*.*)|All files (*.*)|Executables (*.exe;*.com;*.pif)|Libraries and ActiveX controls (*.dll;*.ocx;*.dpl;*.bpl)|Picture Files (*.jpg;*.bmp;*.tif)|Music Files (*.mp3;*.wav;*.wma;*.flac)|Video Files (*.wmv;*.avi;*.flv)|Text Documents (*.txt;*.doc;*.rtf)" , 5 )     If Not @Error = 1 Then GUICtrlSetData ( $InputOut , $OutFile ) EndFunc Func Create()     ;Read the inputs     $PicRead = GUICtrlRead ( $InputPic )     $ArcRead = GUICtrlRead ( $InputArc )     $OutRead = GUICtrlRead ( $InputOut )         If FileGetAttrib ( $PicRead ) = "" Then         MsgBox ( 48 , "Error!" , "Error: You must specify an input image file!" )     ElseIf FileGetAttrib ( $ArcRead ) = "" Then         MsgBox ( 48 , "Error!" , "Error: You must specify an input archive file!" )     ElseIf StringLen ( StringStripWS ( $OutRead , 8 ) ) == 0 Then         MsgBox ( 48 , "Error!" , "Error: You must specify an output image file!" )     Else     ;Creates the new file with the archive in it         ;_RunDOS ('copy /b ' & '"' & $PicRead & '"' & ' + ' & '"' & $ArcRead & '" ' & '"' & $OutRead & '"')     RunWait (@ComSpec & ' /c ' & 'copy /b ' & '"' & $PicRead & '"' & ' + ' & '"' & $ArcRead & '" ' & '"' & $OutRead & '"' , "" , @SW_HIDE ) ;alternative to _RunDOS         ;-----Error function from _RunDOS / RunWait         If @Error = 0 Then         $OutPut = GUICtrlCreateListViewItem ( "|" , $Edit )         GUICtrlSetData ( $OutPut , $OutRead )         $Items = IniRead ( @ScriptDir & "\config.ini" , "Embedder" , "Items" , "Not Found" )         If $Items = "Not Found" Then             IniWrite ( @ScriptDir & "\config.ini" , "Embedder" , "Items" , "1" )             $Items = "1"         EndIf         $Names = IniRead ( @ScriptDir & "\config.ini" , "Embedder" , "Names" , "Not Found" )         If $Names = "Not Found" Then             IniWrite ( @ScriptDir & "\config.ini" , "Embedder" , "Names" , $OutRead )             $Items = "1"         EndIf         IniWrite ( @ScriptDir & "\config.ini" , "Embedder" , "Items" , $Items+1 )         IniWrite ( @ScriptDir & "\config.ini" , "Embedder" , "Names" , $Names&"|"&$OutRead )     Else         MsgBox ( 48 , "Error!" , "Error: Could not create output file!" )     EndIf         ;-----Error function from _RunDOS / RunWait     EndIf EndFunc Func Exitt()     Exit EndFunc

Edited by SxyfrG, 16 February 2008 - 10:40 AM.

My scripts:AppLauncherTRAY - Awesome app launcher that runs from the system tray NEW VERSION! | Run Length Encoding - VERY simple compression in pure autoit | Simple Minesweeper Game - Fun little game :)My website

#16 emoyasha

emoyasha

    Universalist

  • Banned (NOT IN USE)
  • 307 posts

Posted 21 February 2008 - 05:09 AM

well basicly i edited the script so it embeds any file type. basicly it uses the
copy /b
function for command line
i have used it forever to hide my files, but now i did a edit to this script and its all automated.
you can do this with any file type. and the file thats being used as the location for embedding will turn out perfectly (as long as its not a source code for a program such as an au3).
so like you could store an archive in an executable, however you could not store and kind of text file in an exe or it would corrupt it. there are certain limitations, but its very universal.
Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

#17 HR78

HR78

    Seeker

  • Active Members
  • 46 posts

Posted 14 October 2010 - 06:10 PM

well basicly i edited the script so it embeds any file type. basicly it uses the
copy /b
function for command line
i have used it forever to hide my files, but now i did a edit to this script and its all automated.
you can do this with any file type. and the file thats being used as the location for embedding will turn out perfectly (as long as its not a source code for a program such as an au3).
so like you could store an archive in an executable, however you could not store and kind of text file in an exe or it would corrupt it. there are certain limitations, but its very universal.


You Dont Have Extract img tool??? ok, I compress it in .jpg (197mb) ;), I dont have unzip fonction - winrar dont work for this image.

sorry, I open it.

Edited by HR78, 14 October 2010 - 06:13 PM.


#18 Jos

Jos

    Je maintiendrai

  • Developers
  • 23,356 posts

Posted 14 October 2010 - 06:16 PM

You Dont Have Extract img tool??? ok, I compress it in .jpg (197mb) ;), I dont have unzip fonction - winrar dont work for this image.

sorry, I open it.

... and the reason for replying to a 2+ year old post was ?

Visit the SciTE4AutoIt3 Download page for the latest versions                                                                 Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users