action.create Defines a new action |
||||||||||||||
Usage |
||||||||||||||
action.create [-i] [-c] [-l] [-w=<window_types:string>] [-s] [-t=<category:string>] (<name:string>,<visible label:string>,<description:string>,<big_icon_id:string>[,<small_icon_id:string>]) { <action body> } |
||||||||||||||
Description |
||||||||||||||
Defines a new script action. Each action has an unique <name> that must not collide with any core action (i.e. don't use the KVIrc. prefix). At any time you can check action.list to verify that no core action is already using your <name>. If the <name> was already used for a script action then this action is simply replaced by the new one. Each action has an associated <visible label> that is the name meant to be presented to the user, possibly even translated. This label will appear on the toolbar buttons, in the tooltips and in the popup menu items. The string will be evaluated just before the actions is displayed so the eventual runtime translation will fetch from the correct language catalogue. <description> is the descriptive text that will be displayed in the action choice dialog (and maybe in other places). The string will be evaluated just before the actions is displayed so the eventual runtime translation will fetch from the correct language catalogue. ] <big_icon_id> is the image identifier of the icon that will appear on the toolbar buttons and in the action choice dialog. <small_icon_id> is optional and is the image identifier of the icon that will appear in the menu items. Since menu items can be also iconless then this parameter is optional. <action body> is the callback code snippet that will be triggered when this action is activated either by the means of action.trigger, a toolbar button or a menu item selection. An empty <action body> causes this command to behave like action.destroy <name>. |
||||||||||||||
Switches |
||||||||||||||
|
||||||||||||||
Examples |
||||||||||||||
See also |
||||||||||||||
action.destroy, action.trigger |