basically it extracts the 7z extension for you in k-meleon's root folder so you don't have to extract it yourself. also it makes it easier if you don't have 7z intalled or don't want to download it, keih includes basic 7z for the extraction routine at a much smaller size. keih can be launched directly and will prompt for extension, or from commandline-you can associate it with 7z and launch from context menu- and it can install the extension by simple drag and drop..but wait, there's more.. keih will also delete xpti.dat and compreg.dat in case of an extension that uses component files and need to be registered.
http://kmext.sourceforge.net/keih/KEIH.zip
extract keih.zip anywhere you like, to install an extension; simply double click on keih.exe (keih.exe is inside the keih folder you;ve just extracted)
the first time you run keih.exe, it will prompt for kmeleon's install path..just select the folder where kmeleon is installed..that path will be written in an ini file so you won't be asked for it everytime..however you can still change the path if you want frm keih's main interface.
associating 7z to keih:
open folder options>file types
register 7z or add a new command if 7z is already registered.
under 'new action" application to perform action: point to where keih.exe is installed
installing extension through drag and drop:
please note: the 7z folder included with keih is important for the extraction, do not delete it.
source:
; AutoIt Version: 3.3.0
; Language: blahblah
; Platform: Win9x/NT
; Author: yanni
; Script Function: kmeleon extension installer helper
#NoTrayIcon
#include <GUIConstantS E X.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <ButtonConstants.au3>
#include <ProgressConstants.au3>
#Include <String.au3>
#Include <File.au3>
#Include <Array.au3>
$keih=("lazy bastards")
If FileExists(@ScriptDir & "\exthelper.ini") Then
$kmpath = IniRead(@ScriptDir & "\exthelper.ini", "kmeleon", "1", "default")
Else
$kmpath = FileSelectFolder("Select K-Meleon's Folder", "")
IniWrite(@ScriptDir & "\exthelper.ini", "kmeleon", 1, $kmpath)
EndIf
$deletable1 = ($kmpath & "\components\compreg.dat")
$deletable2 = ($kmpath & "\components\xpti.dat")
$kmbinary=($kmpath & "\k-meleon.exe")
if $CmdLine[0] = 0 Then
$extpath = FileOpenDialog("Select Extension", @WorkingDir & "", "K-Meleon Compressed Extensions (*.7z)", 1)
checker()
ElseIf $CmdLine[0] = 1 Then
$extpath = _PathFull($CmdLine[1])
checker()
EndIf
Func checker()
$checkfucker=StringRegExp($extpath, "(?i)7z")
if $checkfucker=0 Then
exit
Else
preinstall()
Endif
Endfunc
Func preinstall()
$shitter = GUICreate("K-Meleon Extension Installer Helper", 368, 158, -1, -1, BitOR($WS_SYSMENU, $WS_EX_TOPMOST))
$Label1 = GUICtrlCreateLabel("K-Meleon Install folder:", 10, 5, 182, 20)
$Label2 = GUICtrlCreateLabel("KEIH will install this extension:", 10, 50, 182, 20)
$Label3 = GUICtrlCreateLabel($extpath, 10, 65, 360, 20)
$Button_a= GUICtrlCreateButton("Install", 182, 100, 80, 20, BitOR($BS_FLAT, $WS_BORDER, $WS_EX_STATICEDGE))
$Button_b = GUICtrlCreateButton("Browse", 268, 20, 80, 20, BitOR($BS_FLAT, $WS_BORDER, $WS_EX_STATICEDGE))
$Button_x= GUICtrlCreateButton("Cancel", 268, 100,80, 20, BitOR($BS_FLAT, $WS_BORDER, $WS_EX_STATICEDGE))
$kmeleonpath = GUICtrlCreateInput("", 10, 20, 255, 20)
$kmpath = IniRead(@ScriptDir & "\exthelper.ini", "kmeleon", "1", "default")
GUICtrlSetData($kmeleonpath, $kmpath)
GUISetState()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $Button_a
sleep(44)
GUIDelete($shitter)
installshit()
Case $msg = $Button_b
$kmpath = FileSelectFolder("Select folder for captured pages:", "")
IniWrite(@ScriptDir & "\exthelper.ini", "kmeleon", 1, $kmpath)
GUICtrlSetData($kmeleonpath, $kmpath)
Case $msg = $Button_x
GUIDelete($shitter)
Return
exit
Case $msg = $GUI_EVENT_CLOSE
GUIDelete($shitter)
Return
exit
Endselect
WEnd
EndFunc
func installshit()
ProgressOn("KEIH: installing extension, please wait..", "initalising..", "0 percent", -1, -1, 16)
$kmbinary=($kmpath & "\k-meleon.exe")
ProgressSet(5, "6 percent", "extracting files")
$7zpath =(@ScriptDir & "\7z\7z.exe")
$pend = FileGetShortName($kmpath)
ProgressSet(15, "15 percent", "extracting..")
$pendparm1 = _StringInsert($pend, "-o", 0)
$pendparm2 = ($pendparm1 & " -y")
$pendparm3 = _StringInsert($pendparm2, " ", 0)
$pendparm7z=("""" & $extpath & """")
$extparm = ("x " & $pendparm7z)
ProgressSet(25, "25 percent", "extraction completed")
$overparm = ($extparm & $pendparm3)
$finalparam =($7zpath & " " & $overparm)
;shellexecute($7zpath, $overparm)
run($finalparam, "", @SW_HIDE)
ProgressSet(65, "65 percent", "extraction completed")
;MsgBox(4096, "Test", $finalparam)
ProgressSet(85, "85 percent", "registering components")
setkm()
ProgressSet(94, "94 percent", "finalising..")
firekm()
ProgressOff()
Winwaitactive("[CLASS:KMeleon Browser Window]", "")
sleep(888)
MsgBox(64, "K-Meleon Extension Installer Helper", "Extension was installed successfully. ")
exit
endfunc
Func setkm()
FileDelete($deletable1)
sleep(40)
FileDelete($deletable2)
endFunc
Func firekm()
While ProcesS E Xists("k-meleon.exe")
WinClose("[CLASS:KMeleon Browser Window]", "");
sleep(400);
If WinActive("K-Meleon") Then
Send("{Enter}")
EndIf
Wend
sleep(1400)
Run($kmbinary)
endFunc