unuro Posted August 14, 2012 Posted August 14, 2012 Does anyone know what the problem is the script, why not work? expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <File.au3> #include <Crypt.au3> $Form1 = GUICreate("Form1", 260, 52, 471, 268) $Button1 = GUICtrlCreateButton("Lock All Files", 8, 16, 99, 25) $Button2 = GUICtrlCreateButton("Unlock All Files", 120, 16, 107, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $Folder = FileSelectFolder("Choose a folder.", "", 1, @DesktopDir,$Form1) If Not @error Then $List1 = _FileListToArray($Folder, "*", 1) For $nr = 1 To $List1[0] _Crypt_EncryptFile($Folder&"\"&$List1[$nr],$Folder&"\"&$List1[$nr],"unu",$CALG_DES) Next MsgBox(64,"Info","Finishied Crypt!") ElseIf @error = 1 Then ExitLoop($Folder) Else MsgBox(16,"Error",@error) EndIf Case $Button2 $Folder = FileSelectFolder("Choose a folder.", "", 1, @DesktopDir,$Form1) If Not @error Then $List1 = _FileListToArray($Folder, "*", 1) For $nr = 1 To $List1[0] _Crypt_DecryptFile($Folder&"\"&$List1[$nr],$Folder&"\"&$List1[$nr],"unu",$CALG_DES) Next MsgBox(64,"Info","Finishied Decrypt!") ElseIf @error = 1 Then ExitLoop($Folder) Else MsgBox(16,"Error",@error) EndIf EndSwitch WEnd
spudw2k Posted August 16, 2012 Posted August 16, 2012 I suspect it is failing because it is overwriting the file as it is being encrypted. Try making a new file then delete the original and rename the file. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now