General
: K-Meleon Forum
General discussion about K-Meleon.
Goto:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=JamesD] @ johnllew Here is a fix for your group name selections. It allows the selected group name to be copied to the clipboard. The name can then be entered into any prompt with just CTRL + V keystroke. [b]Grp_Select.kmm[/b] [code] # K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2) # Grp_Select.kmm # ---------- Allow a user to select an existing group name for copy to clipboard # ---------- Intergraded into Groups2 menu # # Dependencies : main.kmm KM version 1.5 or later and tabs, Groups2.kmm # Resources : - # Preferences : k-meleon_Groups2.<#> = Group name # : k-meleon_Groups2.count = Total of groups count # Version : 0.3 2012_12_05 # Author : JamesD # ----------------------------------------------------------------------------------- _Grp_Select_RunCode { macroinfo = _("Select a group name for the clipboard."); macros("_Grp_Select_Action") ; } _Grp_Select_Action { $_Grp_Select_CurrCount = getpref(INT,"k-meleon_Groups2.count") -1; $_Grp_Select_Description = "===== Numbered group names ===== \n\n"; $_Grp_Select_Count = 1 ; while($_Grp_Select_Count <= $_Grp_Select_CurrCount) { $_Grp_Select_Desc = getpref(STRING,"k-meleon_Groups2.".$_Grp_Select_Count) ; $_Grp_Select_Description = $_Grp_Select_Description.$_Grp_Select_Count." -- ".$_Grp_Select_Desc."\n" ; $_Grp_Select_Count = $_Grp_Select_Count +1; } alert($_Grp_Select_Description, _("Note the number next to your choice"), ); $_Grp_Select_Unit = prompt( _("Enter a number 1 to "). $_Grp_Select_Count-1, _("Select this group")); $_Grp_Select_Unit=="" ? &_Grp_Select_Action1 : &_Grp_Select_Action2 ; } _Grp_Select_Action1 { alert(_("No value or cancel was pressed."), _("No action to be taken."), INFO); } ## Must be an integer comparison. Therefore CurrCount must be on the left as it came from an INT pref # $_Grp_Select_Unit > $_Grp_Select_CurrCount won't work above count of 9 _Grp_Select_Action2 { $_Grp_Select_CurrCount < $_Grp_Select_Unit ? &_Grp_Select_Action3 : &_Grp_Select_Action4 ; } _Grp_Select_Action3 { alert( _("Number entered is out of range."), _("No action to be taken."), INFO); } _Grp_Select_Action4 { $_Grp_Select_Unit < 1 ? &_Grp_Select_Action3 : &_Grp_Select_Action5 ; } _Grp_Select_Action5 { $_Grp_Select_Name = getpref(STRING,"k-meleon_Groups2.".$_Grp_Select_Unit); setclipboard( $_Grp_Select_Name ); statusbar( $_Grp_Select_Name . " ". _("group name is on the clipboard") ); } _Grp_Select_BuildMenu { setmenu("_Groups", macro, _("Select a group name"), _Grp_Select_RunCode); } # ----------------------------------------------------------------------------------- $OnInit = $OnInit . "_Grp_Select_BuildMenu;"; $macroModules = $macroModules . "Grp_Select;"; [/code][/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development