Extensions
: K-Meleon Forum
All about K-Meleon extensions.
Goto:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=disrupted] for kmeleon 1.1.x and 1.50 to 1.5.2 use this version: [url=http://kmext.sourceforge.net/files/kmdefaulter.7z]http://kmext.sourceforge.net/files/kmdefaulter.7z[/url] [s]kmdefaulter.exe [u]MUST[/u] be saved in k-meleon's root folder.. otherwise big mess[/s] create shortcut to kmdefaulter.exe in startmenu, desktop etc(where you usually run kmeleon) [img]http://kmeleon.swiftfree.net/snaps/kmdefaulter.jpg[img] src: [color=blue][sub]; AutoIt Version: 3.3.0 ; Language: English ; Platform: Win9x/NT ; Author: yanni #NoTrayIcon #include <GUIConstant[color=red]S E X[/color].au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <ButtonConstants.au3> #Include <String.au3> $kmpath=(@scriptdir & "\k-meleon.exe") $longpath=("""" & $kmpath & """") $parm=($longpath & " " & """" & "%1" & """") check() Func check() $isdef=RegRead("HKEY_CLASSES_ROOT\HTTP\shell\open\command", "") $checker=StringRegExp($isdef, "(?i)k-meleon.exe") If $checker=1 Then Run($longpath) Else ask() EndIf EndFunc Func ask() $ask=MsgBox(32+4, "K-Meleon Defaulter", "K-Meleon is not currently your default browser. Would you like to set K-Meleon as your default B?") If $ask=7 Then Run($longpath) Exit Else setdefault() EndIf EndFunc Func setdefault() RegWrite("HKEY_CLASSES_ROOT\HTTP\shell\open\command", "", "REG_SZ", $parm) RegWrite("HKEY_CLASSES_ROOT\HTTPS\shell\open\command", "", "REG_SZ", $parm) RegWrite("HKEY_CLASSES_ROOT\FTP\shell\open\command", "", "REG_SZ", $parm) RegWrite("HKEY_CLASSES_ROOT\htmlfile\shell\open\command", "", "REG_SZ", $parm) RegWrite("HKEY_CLASSES_ROOT\xhtmlfile\shell\open\command", "", "REG_SZ", $parm) $candy = GUICreate("registering k-meleon", 184, 28, -1, -1, BitOR($WS_DLGFRAME, $WS_POPUP, $WS_EX_TOPMOST)) $label = GUICtrlCreateLabel("K-Meleon registered successfully", 15, 7, 210, 20) GUISetState(@SW_SHOW) WinSetOnTop("registering k-meleon", "", 1) While 1 $msg = GUIGetMsg() sleep(4000) GUIDelete() ExitLoop WEnd Run($longpath) Exit EndFunc[/sub][/color] update: now safe..will exit with error message if user attempts running from wrong path [img]http://kmeleon.swiftfree.net/snaps/kmdefaulter-error.jpg[/img] [color=blue][sub]; AutoIt Version: 3.3.0 ; Language: English ; Platform: Win9x/NT ; Author: yanni #NoTrayIcon #include <GUIConstant[color=red]S E X[/color].au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <ButtonConstants.au3> #Include <String.au3> $kmpath=(@scriptdir & "\k-meleon.exe") $foolproof=FileExists($kmpath) If $foolproof=1 Then check() Else MsgBox(16, "User Error", "Can't resume. Please run this utility from K-Meleon's folder!") EndIf Func check() $kmpath=(@scriptdir & "\k-meleon.exe") $longpath=("""" & $kmpath & """") $parm=($longpath & " " & """" & "%1" & """") $isdef=RegRead("HKEY_CLASSES_ROOT\HTTP\shell\open\command", "") $checker=StringRegExp($isdef, "(?i)k-meleon.exe") If $checker=1 Then Run($longpath) Else ask() EndIf EndFunc Func ask() $kmpath=(@scriptdir & "\k-meleon.exe") $longpath=("""" & $kmpath & """") $parm=($longpath & " " & """" & "%1" & """") $ask=MsgBox(32+4, "K-Meleon Defaulter", "K-Meleon is not currently your default browser. Would you like to set K-Meleon as your default B?") If $ask=7 Then Run($longpath) Exit Else setdefault() EndIf EndFunc Func setdefault() $kmpath=(@scriptdir & "\k-meleon.exe") $longpath=("""" & $kmpath & """") $parm=($longpath & " " & """" & "%1" & """") RegWrite("HKEY_CLASSES_ROOT\HTTP\shell\open\command", "", "REG_SZ", $parm) RegWrite("HKEY_CLASSES_ROOT\HTTPS\shell\open\command", "", "REG_SZ", $parm) RegWrite("HKEY_CLASSES_ROOT\FTP\shell\open\command", "", "REG_SZ", $parm) RegWrite("HKEY_CLASSES_ROOT\htmlfile\shell\open\command", "", "REG_SZ", $parm) RegWrite("HKEY_CLASSES_ROOT\xhtmlfile\shell\open\command", "", "REG_SZ", $parm) $candy = GUICreate("registering k-meleon", 184, 28, -1, -1, BitOR($WS_DLGFRAME, $WS_POPUP, $WS_EX_TOPMOST)) $label = GUICtrlCreateLabel("K-Meleon registered successfully", 15, 7, 210, 20) GUISetState(@SW_SHOW) WinSetOnTop("registering k-meleon", "", 1) While 1 $msg = GUIGetMsg() sleep(4000) GUIDelete() ExitLoop WEnd Run($longpath) Exit EndFunc[/sub][/color][/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development