GetPluginTriggerList
Script function

world.GetPluginTriggerList

DOC_scripting Read about scripting

Type

Method

Summary

Gets the list of triggers in a specified plugin

Prototype

VARIANT GetPluginTriggerList(BSTR PluginID);

DOC_data_types View list of data type meanings


Description

Returns an array of all the named triggers currently defined for the nominated plugin. You can then use GetPluginTriggerInfo to find out more details about each one.

If you want to find the list of triggers in the current plugin, use "GetTriggerList".

If you are writing a plugin and want to find the "global" MUSHclient trigger list, use an empty plugin ID, eg.

trList = world.GetPluginTriggerList ("")



VBscript example

dim trList

trList = world.GetPluginTriggerList ("982581e59ab42844527eec80")

If Not IsEmpty (trList) Then
  for each t in trList
    world.note t
  next
End If



Jscript example

triggerlist = new VBArray(world.GetPluginTriggerList("982581e59ab42844527eec80")).toArray();

if (triggerlist)  // if not empty
 for (i = 0; i < triggerlist.length; i++)
   world.note(triggerlist [i]);



PerlScript example

foreach $item (Win32::OLE::in ($world->GetPluginTriggerList ("982581e59ab42844527eec80")))
 {
 $world->note($item);
 }



Python example

triggerlist = world.GetPluginTriggerList("982581e59ab42844527eec80")
if (triggerlist ):
  for t in triggerlist : world.Note (t)



Lua example

for k, v in pairs (GetPluginTriggerList ("982581e59ab42844527eec80")) do 
  Note (v) 
end



Return value

If there are no triggers (with names) then the return value is empty. Use "IsEmpty" to test for this possibility.

If the nominated plugin does not exist, then the return value is NULL. Use "IsNull" to test for this possibility.

Otherwise, it returns a variant array containing the names of all the triggers in the specified plugin. Use "ubound" to find the number of triggers in the list. You can then use "GetPluginTrigger" to find details about each trigger.




See Also ...

Topics

DOC_aliases Aliases
DOC_defaults Default triggers/aliases/timers/macros/colours
DOC_starting Getting started
DOC_group Groups
DOC_plugins Plugins
DOC_regexp Regular Expressions
DOC_timers Timers
DOC_triggers Triggers

Functions

FNC_AddTrigger AddTrigger (Adds a trigger)
FNC_AddTriggerEx AddTriggerEx (Adds a trigger - extended arguments)
FNC_DeleteTemporaryTriggers DeleteTemporaryTriggers (Deletes all temporary triggers)
FNC_DeleteTrigger DeleteTrigger (Deletes a trigger)
FNC_DeleteTriggerGroup DeleteTriggerGroup (Deletes a group of triggers)
FNC_EnableTrigger EnableTrigger (Enables or disables a trigger)
FNC_EnableTriggerGroup EnableTriggerGroup (Enables/disables a group of triggers)
FNC_GetPluginTriggerInfo GetPluginTriggerInfo (Gets details about a named trigger for a specified plugin)
FNC_GetTrigger GetTrigger (Gets details about a named trigger)
FNC_GetTriggerInfo GetTriggerInfo (Gets details about a named trigger)
FNC_GetTriggerList GetTriggerList (Gets the list of triggers)
FNC_GetTriggerOption GetTriggerOption (Gets the value of a named trigger option)
FNC_GetTriggerWildcard GetTriggerWildcard (Returns the contents of the specified wildcard for the named trigger)
FNC_IsTrigger IsTrigger (Tests to see if a trigger exists)
FNC_SetTriggerOption SetTriggerOption (Sets the value of a named trigger option)

(Help topic: function=GetPluginTriggerList)

DOC_contents Documentation contents page