0

I have WinRar installed and I would like to know if the program has command line functions to extract the compressed files using a hotkey with autohotkey. I haven't found this, so I've seen other alternatives for this, like:

https://www.autohotkey.com/board/topic/23219-extract-from-rar-075-090/ https://www.autohotkey.com/board/topic/86876-unrarhk-unrar-your-moviesseries-efortlessly-from-context-menu/

This only accepts .rar files: https://www.autohotkey.com/boards/viewtopic.php?t=55680 Thanks in advance

3
  • You misunderstand - the AutoHotKey scripts call the WinRar program. Nothing else.
    – harrymc
    Sep 5 at 16:44
  • I understand, but how do I do this?
    – Elermino
    Sep 5 at 16:51
  • The same way that do those scripts you found.
    – harrymc
    Sep 5 at 16:54

2 Answers 2

1

What would be the need for that? Most archive tools, such as 7-Zip, can be installed to automatically handle all specified file extensions:

  • In Windows Explorer, select an archive and press Enter or Double-click the file to open the file. In 7-Zip, use CtrlPgDn to extract it.
  • In Windows Explorer, right-click to use context-menu items, such as Extract archive here, Add to archive, etc.
0

This implementation is used to extract .rar and .zip files and allows you to enter the password if the file contains it:

~^q:: ;CTRL + Q = descomprimir

;inicio
7z := "C:\Archivos de programa\7-Zip\7zG.exe"

;guarda una copia del portapapeles
Clipboard_ := ClipboardAll 

;copiar la ruta del archivo comprimido
Send, ^c 
Sleep 100
Send, ^c

;descomprimir
SplitPath, Clipboard, Nombre_Archivo, Directorio,, Nombre_Archivo_NoEXT
RunWait, "%7z%" x "%Clipboard%" -o"%Directorio%\%Nombre_Archivo_NoEXT%",, UseErrorLevel
if (!ErrorLevel) {
    ;FileRecycle, %ClipBoard%
}

;restaura el protapapeles
Clipboard := Clipboard_, Clipboard_ := ""
return

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .