Toggle Images & Reload
Posted by: adamlau
Date: February 25, 2008 12:43PM

What is the most elegant way to perform an auto reload upon an F9 toggle images? basically, a F9 = pref_ToggleImages,ID_NAV_RELOAD. Attempted to create a maco with setaccel(), but am unable to dubug the problem. How can the folowing macro bo fixed and is there a simpler solution for F9 = pref_ToggleImages,ID_NAV_RELOAD?


# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ---------- Toggle Images & Reload -------------------------------------------------------------------------------------
#
# Dependencies : main.kmm ($macroPrefBranch, Accessibility)
# Resources : -
# Preferences : kmeleon.plugins.macros.togImgReload
#
# ------------------------------------------------------------------------------------------------------------------

$_togImgReload=$macroPrefBranch."togImageReload";

_togImgReload_SetAccels {
setaccel("pref_ToggleImages","ID_NAV_RELOAD")
}
$OnInit=$OnInit."_togImgReload_SetAccels;";
$macroModules=$macroModules."togImgReload;";

Re: Toggle Images & Reload
Posted by: desga_2
Date: February 26, 2008 04:14AM

This code must work to you:
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) 

# ---------- Toggle Images & Reload -------------------------------------------
# 
# Dependencies : main.kmm (pref_ToggleImages) 
# Resources : - 
# Preferences : -
# 
# -----------------------------------------------------------------------------

_togImgReload{
&pref_ToggleImages;id(ID_NAV_RELOAD);
}

_togImgReload_SetAccels{
setaccel(VK_F9,"macros(_togImgReload)");
}

$OnInit=$OnInit."_togImgReload_SetAccels;";
$macroModules=$macroModules."togImgReload;";



K-Meleon forum is powered by Phorum.