such doch mal nach: winrar resourcehacker
Need Help
-
- [ offen ]
-
Kiba -
29. Oktober 2007 um 14:20 -
Geschlossen -
Erledigt
-
-
Ansonsten kann man auch 7Zip nutzen, das ist Freeware
-
Vielleicht anstatt
[autoit]ControlClick("Bitte erwerben Sie eine Lizenz für WinRAR", "", "[Class:Button; Textchließen]")
[/autoit]
[autoit]
das hier:ControlClick("Bitte erwerben Sie eine Lizenz für WinRAR", "", "[Class:Button;Text schließen]")
[/autoit]
[autoit]
oder:Send("{ALTDOWN}{F4}{ALTUP}")
[/autoit] -
Hab mir mal auf Basis der rar.exe und tar.exe (+fsum.exe) einen ent/packer geschrieben, ich würde dir auch vorschlagen, steig auf kommandozeile um.
die datein benötigst du natürlich, bzw du streichst den code einfach.oder du machst was eigenes hieraus:
[autoit]ShellExecuteWait(@ScriptDir & "\rar.exe", ' x -o- "' & $Folder[$i] & '"', @ScriptDir, "open", @SW_HIDE)
[/autoit]hier komplett:
Spoiler anzeigen
[autoit]#NoTrayIcon
[/autoit] [autoit][/autoit] [autoit]
#Include <File.au3>
#Include <Array.au3>If $CmdLine[0] <= 0 Then
[/autoit] [autoit][/autoit] [autoit]
_PackTar()
Else
Select
Case $CmdLine[1] = "-kill"
If $CmdLine[0] = 2 Then
_Kill($CmdLine[2])
ElseIf $CmdLine[0] = 1 Then
_Kill0r()
EndIf
Case $CmdLine[1] = "-rar"
_DePack()
Case $CmdLine[1] = "+rar"
If $CmdLine[0] = 4 Then
_PackRar($CmdLine[2], $CmdLine[3], $CmdLine[4])
ElseIf $CmdLine[0] = 3 Then
_PackRar($CmdLine[2], $CmdLine[3])
ElseIf $CmdLine[0] = 2 Then
_PackRar($CmdLine[2])
ElseIf $CmdLine[0] = 1 Then
_PackRar()
EndIf
Case Else
Exit
EndSelect
EndIfFunc _PackTar()
[/autoit] [autoit][/autoit] [autoit]
FileInstall("tar.exe", "tar.exe")
$Folder =_FileListToArray(@ScriptDir, "*", 2)
If @Error Then Exit
If $Folder[0] <= 0 Then Exit
While ProcessExists("tar.exe") Or ProcessExists("rar.exe")
Sleep(30000)
WEndFor $i = 1 To $Folder[0]
[/autoit] [autoit][/autoit] [autoit]
ShellExecuteWait(@ScriptDir & "\tar.exe", ' -cf "' & $Folder[$i] & '.tar" ' & $Folder[$i], @ScriptDir, "open", @SW_HIDE)
Next_FileCreate(@ScriptDir & '\Fertig mit packen!')
[/autoit] [autoit][/autoit] [autoit]
FileDelete(@ScriptDir & "\tar.exe")
Exit
EndFuncFunc _DePack()
[/autoit] [autoit][/autoit] [autoit]
FileInstall("rar.exe", "rar.exe")
$Folder =_FileListToArray(@ScriptDir, "*.rar", 1)
If @Error Then ExitWhile ProcessExists("tar.exe") Or ProcessExists("rar.exe")
[/autoit] [autoit][/autoit] [autoit]
Sleep(30000)
WEnd
For $i = 1 To $Folder[0]
ShellExecuteWait(@ScriptDir & "\rar.exe", ' x -o- "' & $Folder[$i] & '"', @ScriptDir, "open", @SW_HIDE)
Next_FileCreate(@ScriptDir & '\Fertig mit entpacken!')
[/autoit] [autoit][/autoit] [autoit]
FileDelete(@ScriptDir & "\rar.exe")
Exit
EndFuncFunc _PackRar($CmdLine2 = 50, $CmdLine3 = 0, $CmdLine4 = 1)
[/autoit] [autoit][/autoit] [autoit]
FileInstall("rar.exe", "rar.exe")
FileInstall("fsum.exe", "fsum.exe")$Folder =_FileListToArray(@ScriptDir, "*")
[/autoit] [autoit][/autoit] [autoit]
If $CmdLine4 > $Folder[0] Then Exit
If Not $CmdLine3 = 0 Then
Else
$CmdLine3 = $Folder[$CmdLine4]
EndIf
If @Error Then ExitWhile ProcessExists("tar.exe") Or ProcessExists("rar.exe")
[/autoit] [autoit][/autoit] [autoit]
Sleep(30000)
WEnd
$bytes = $CmdLine2 * 1000000
ShellExecuteWait(@ScriptDir & "\rar.exe", ' a -m0 -mdA-G -vn -v' & $bytes & 'b "' & $CmdLine3 & '.rar" "' & $Folder[$CmdLine4] & '"y', @ScriptDir, "open", @SW_HIDE)
Sleep (1000)
_FileCreate("SFVBatch.bat")
FileWrite("SFVBatch.bat", "@echo off" & @CRLF)
FileWrite("SFVBatch.bat", 'fsum -js "' & $CmdLine3 & '.r*" > "' & $Folder[$CmdLine4] & '.sfv"' & @CRLF)
FileWrite("SFVBatch.bat", "del SFVBatch.bat")
ShellExecuteWait(@ScriptDir & "\SFVBatch.bat", "", @ScriptDir, "open", @SW_HIDE)
_FileCreate(@ScriptDir & '\Fertig mit packen!')
FileDelete(@ScriptDir & "\rar.exe")
FileDelete(@ScriptDir & "\fsum.exe")
Exit
EndFuncFunc _Kill0r()
[/autoit] [autoit][/autoit] [autoit]
Do
$PIDCMD = ProcessExists("Cmd.exe")
ProcessClose($PIDCMD)
Until $PIDCMD = 0
Do
$PIDTAR = ProcessExists("tar.exe")
ProcessClose($PIDTAR)
Until $PIDTAR = 0
Do
$PIDRAR = ProcessExists("rar.exe")
ProcessClose($PIDRAR)
Until $PIDRAR = 0
If _Singleton(@ScriptName, 1) = 0 Then
Do
$PID = ProcessExists(@ScriptName)
If $PID = @AutoItPID Then ContinueLoop
ProcessClose($PID)
Until ($PID <> 0)
EndIf
Exit
EndFuncFunc _Kill($CmdLine2)
[/autoit]
Do
$PID = ProcessExists($CmdLine2)
ProcessClose($PID)
Until $PID = 0
EndFunc -