AutoIt Forums: Unpack *.rar? - AutoIt Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Unpack *.rar? how?

#1 User is offline   E1M1 

  • Newbie
  • PipPipPipPip
  • Group: Full Members
  • Posts: 573
  • Joined: 02-February 09
  • Gender:Male

Posted 30 December 2009 - 10:00 PM

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?

#2 User is offline   Fire 

  • Mass Spammer!
  • PipPipPipPip
  • Group: Full Members
  • Posts: 321
  • Joined: 10-November 09
  • Gender:Not Telling

Posted 30 December 2009 - 10:02 PM

Here is: http://www.autoitscript.com/forum/index.php?showtopic=107377

#3 User is offline   JamesBrooks 

  • Do You Wanna Be A Human Controlling An Avatar?
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 8,076
  • Joined: 24-November 06
  • Gender:Male
  • Location:Null

Posted 30 December 2009 - 10:04 PM

View PostE1M1, 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


#4 User is offline   E1M1 

  • Newbie
  • PipPipPipPip
  • Group: Full Members
  • Posts: 573
  • Joined: 02-February 09
  • Gender:Male

Posted 30 December 2009 - 10:15 PM

thanks

#5 User is offline   Manadar 

  • Wikitastic!
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 8,756
  • Joined: 08-February 06
  • Gender:Male
  • Location:Alkmaar, The Netherlands

Posted 30 December 2009 - 10:20 PM

View PostJamesBrooks, on 30 December 2009 - 10:04 PM, said:

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)

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 User is offline   JamesBrooks 

  • Do You Wanna Be A Human Controlling An Avatar?
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 8,076
  • Joined: 24-November 06
  • Gender:Male
  • Location:Null

Posted 30 December 2009 - 10:24 PM

View PostManadar, 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


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
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users