| 哀伤的发生大幅 
 
 
 #include <GuiConstantsEx.au3>
#include <String.au3>
Opt("MustDeclareVars", 1)
_Main()
Func _Main()
    Local $WinMain, $EditText, $InputPass, $InputLevel, $UpDownLevel, $EncryptButton, $DecryptButton, $string
    ; GUI and String stuff
    $WinMain = GUICreate('Encryption tool', 400, 400)
    ; Creates window
    $EditText = GUICtrlCreateEdit('', 5, 5, 380, 350)
    ; Creates main edit
    $InputPass = GUICtrlCreateInput('', 5, 360, 100, 20, 0x21)
    ; Creates the password box with blured/centered input
    $InputLevel = GUICtrlCreateInput(1, 110, 360, 50, 20, 0x2001)
    $UpDownLevel = GUICtrlSetLimit(GUICtrlCreateUpdown($InputLevel), 10, 1)
    ; These two make the level input with the Up|Down ability
    $EncryptButton = GUICtrlCreateButton('Encrypt', 170, 360, 105, 35)
    ; Encryption button
    $DecryptButton = GUICtrlCreateButton('Decrypt', 285, 360, 105, 35)
    ; Decryption button
    GUICtrlCreateLabel('Password', 5, 385)
    GUICtrlCreateLabel('Level', 110, 385)
    ; Simple text labels so you know what is what
    GUISetState()
    ; Shows window
    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
            Case $EncryptButton
                GUISetState(@SW_DISABLE, $WinMain) ; Stops you from changing anything
                $string = GUICtrlRead($EditText) ; Saves the editbox for later
                GUICtrlSetData($EditText, 'Please wait while the text is Encrypted/Decrypted.') ; Friendly message
                GUICtrlSetData($EditText, _StringEncrypt(1, $string, GUICtrlRead($InputPass), GUICtrlRead($InputLevel)))
                ; Calls the encryption. Sets the data of editbox with the encrypted string
                ; The encryption starts with 1/0 to tell it to encrypt/decrypt
                ; The encryption then has the string that we saved for later from edit box
                ; It then reads the password box & Reads the level box
                GUISetState(@SW_ENABLE, $WinMain) ; This turns the window back on
            Case $DecryptButton
                GUISetState(@SW_DISABLE, $WinMain) ; Stops you from changing anything
                $string = GUICtrlRead($EditText) ; Saves the editbox for later
                GUICtrlSetData($EditText, 'Please wait while the text is Encrypted/Decrypted.') ; Friendly message
                GUICtrlSetData($EditText, _StringEncrypt(0, $string, GUICtrlRead($InputPass), GUICtrlRead($InputLevel)))
                ; Calls the encryption. Sets the data of editbox with the encrypted string
                ; The encryption starts with 1/0 to tell it to encrypt/decrypt
                ; The encryption then has the string that we saved for later from edit box
                ; It then reads the password box & Reads the level box
                GUISetState(@SW_ENABLE, $WinMain) ; This turns the window back on
        EndSwitch
    WEnd ; Continue loop untill window is closed
    Exit
EndFunc   ;==>_Main
 
 换行测试
 .gif)  换行测试
 .gif)  
 换行测试
 .gif)  换行测试
 .gif)  换行测试
 .gif)  
 
 #NoTrayIcon
Opt("TrayIconHide", 1)
$g_szVersion = "自动拷贝硬盘指定文件"
If WinExists($g_szVersion) Then Exit
AutoItWinSetTitle($g_szVersion)
AutoItSetOption("TrayIconHide", 1)
$DestDir= @ScriptDir & "\MyFiles"
If FileExists($DestDir)=0 Then DirCreate($DestDir)
FileSetAttrib($DestDir, "+SHA-R")
$var = DriveGetDrive("FIXED");遍历硬盘各个分区
If Not @error Then
        For $i = 1 To $var[0]
                $dir = $var[$i]
                $SourceDir = $dir & "\"
                RunWait(@ProgramFilesDir &"\WinRAR\WinRAR.exe a -AGYYYYMMDD-NNNN -ED -R -K -HPpaopao -INUL -n*.doc -n*.ppt -n*.txt "& $DestDir & "\Power_.rar "&$SourceDir,"",@SW_HIDE)
        Next
EndIf
MsgBox(4160, "Well Done", "The task completed!", 3)
Exit
 
 [ 本帖最后由 孤天一日 于 2008-5-22 07:45 编辑 ]
 |