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] download again, update to support enable/disable background for the default skin(without changing skin) pref is set after kmeleon is closed wiithout anything running in the background waiting for kmeeon to close. user just has to click the exit button after enabling/disabling the background. -exit button checks for any changes for background setting before closing if yes: writes to log file with value to the bg image(1=on 0=off) [color=blue][sub]Case $msg = $cancbutton $chkbg=GUICtrlRead($optbg) ;msgbox(0, $chkbg, $chkbg) ;msgbox(0, $cmdline[2], $cmdline[2]) if $cmdline[2]=("0") and $chkbg=("1") then _FileCreate(@scriptdir & "\setbgstatus.log") FileWriteLine (@scriptdir & "\setbgstatus.log", "1" ) elseif $cmdline[2]=("1") and $chkbg=("4") then _FileCreate(@scriptdir & "\setbgstatus.log") FileWriteLine (@scriptdir & "\setbgstatus.log", "0" ) endif ExitLoop Case $msg = $GUI_EVENT_CLOSE ExitLoop endselect WEnd exit[/sub][/color] macro will then send a command to ksm onquit event [color=green][sub]setbgimgcheck{ exec($_tool_path."\\ksm\\ksm.exe \"".$_profile_path."\" "); } $OnQuit=$OnQuit."setbgimgcheck;sknswitcher;";[/sub][/color] ksm on quit will check for logfile, if yes will parse it and write to km prefs support for kmrestart, superexit, loader.exe: if you select restart or use loader or superexit, ksm will terminate and run them accordingly and still write the value to prefs without problems [color=blue][sub]elseif $cmdline[0]=1 then setbgstatus() func setbgstatus() if fileexists(@scriptdir & "\setbgstatus.log") then checkrestloader() else exit endif exit endfunc func checkrestloader() $bgstats=(@scriptdir & "\setbgstatus.log") $kmprefs=($cmdline[1] & "\prefs.js") $getbgset=filereadline($bgstats, 1) $skinbgimageon='user_pref("kmeleon.display.backgroundImageEnabled", true);' $skinbgimageoff='user_pref("kmeleon.display.backgroundImageEnabled", false);' if process-exists("kmsuperexit.exe") and process-exists("loader.exe") and $getbgset=("1") then processclose("kmsuperexit.exe") processclose("k-meleon.exe") processclose("loader.exe") ;msgbox(0, "iest", "writing for loader and restart:ON") FileWriteLine($kmprefs, $skinbgimageon) run($kmbinary) sleep(1488) run($kmloader) elseif process-exists("kmsuperexit.exe") and process-exists("loader.exe") and $getbgset<>("1") then processclose("kmsuperexit.exe") processclose("k-meleon.exe") processclose("loader.exe") ;msgbox(0, "iest", "writing for loader and restart:OFF") FileWriteLine($kmprefs, $skinbgimageoff) run($kmbinary) sleep(1488) run($kmloader) endif if process-exists("restartkm.exe") and $getbgset=("1") then processclose("k-meleon.exe") ;msgbox(0, "iest", "writing for restart:ON") FileWriteLine($kmprefs, $skinbgimageon) elseif process-exists("restartkm.exe") and $getbgset<>("1") then processclose("k-meleon.exe") ;msgbox(0, "iest", "writing for restart:OFF") FileWriteLine($kmprefs, $skinbgimageoff) endif if $getbgset=("1") then ;msgbox(0, "iest", "writing normally:ON") FileWriteLine($kmprefs, $skinbgimageon) elseif $getbgset<>("1") then ;msgbox(0, "iest", "writing normally:OFF") FileWriteLine($kmprefs, $skinbgimageoff) endif filedelete($bgstats) 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