How to make script that unpacks rar file? I searched from example scripts and found 7zip udf that works nice but it didn't work with rar files, can you recommend me something?
Page 1 of 1
Unpack *.rar? how?
#2
Posted 30 December 2009 - 10:02 PM
#3
Posted 30 December 2009 - 10:04 PM
E1M1, on 30 December 2009 - 09:00 PM, said:
How to make script that unpacks rar file? I searched from example scripts and found 7zip udf that works nice but it didn't work with rar files, can you recommend me something?
Download unrar.exe into your script directory.
Add this function to your code:
[ autoIt ] ( Popup )
Func _Extract($sArchive, $sLocation) $myExtract = Run(@ScriptDir & "\UnRAR.exe x " & $sArchive & " " & $sLocation, @ScriptDir, @SW_HIDE, 0x2) While 1 $extLine = StdoutRead($myExtract) If @error Then ExitLoop EndIf WEnd EndFunc
Also, this function is written by me, for AutoAV (making it easier to search for now :P)
This post has been edited by JamesBrooks: 30 December 2009 - 10:06 PM
#5
Posted 30 December 2009 - 10:20 PM
JamesBrooks, on 30 December 2009 - 10:04 PM, said:
Add this function to your code:
Also, this function is written by me, for AutoAV (making it easier to search for now :P)
[ autoIt ] ( Popup )
Func _Extract($sArchive, $sLocation) $myExtract = Run(@ScriptDir & "\UnRAR.exe x " & $sArchive & " " & $sLocation, @ScriptDir, @SW_HIDE, 0x2) While 1 $extLine = StdoutRead($myExtract) If @error Then ExitLoop EndIf WEnd EndFunc
Also, this function is written by me, for AutoAV (making it easier to search for now :P)
James, I find it a little bit weird that you are getting data from the out stream, instead of just using RunWait or checking if the process still exists.. And also
omglul you shard sum code from autoav
#6
Posted 30 December 2009 - 10:24 PM
Manadar, on 30 December 2009 - 09:20 PM, said:
James, I find it a little bit weird that you are getting data from the out stream, instead of just using RunWait or checking if the process still exists.. And also
omglul you shard sum code from autoav
omglul you shard sum code from autoav
The reason it was coming out of the stream was so that I could check everything was going through, I never did get round to changing that.
Sharing code? http://www.autoitscript.com/forum/public/style_emoticons/autoit/ph34r.gif
Page 1 of 1

Sign In
Register
Help

MultiQuote