AcceleratorList
Script function

world.AcceleratorList

DOC_scripting Read about scripting

Type

Method

Summary

List defined accelerators

Prototype

VARIANT AcceleratorList();

DOC_data_types View list of data type meanings


Description

Returns an array of all the accelerator keys currently defined, in the format:

keystroke = text

eg.

Ctrl+E = eat meat
Ctrl+F = follow
Ctrl+K = kill



VBscript example

dim accList

arrList = world.AcceleratorList

If Not IsEmpty (accList) Then
  
  For Each a In arrList 
    world.note a
  Next

End If



Lua example

-- simple example

for _, v in pairs (AcceleratorList ()) do 
  Note (v) 
end

-- complex example - filters on a supplied string

function FindCommand (what)
  -- search all accelerators for wanted string
  for _, v in pairs (AcceleratorList ()) do
    if string.find (string.upper (v), string.upper (what), 1, true) then
      print (v)
    end	-- if
  end  -- for
end   -- function

FindCommand "eat"



Lua notes

The example above shows how you might search for accelerators matching a particular string.



Return value

If there are no accelerators defined then the return value is empty. Use "IsEmpty" to test for this possibility.

Otherwise, it returns a variant array containing the keystrokes and contents of each accelerator. 

Use "lbound" and "ubound" to find the bounds of the array of list (ie. the number of accelerators in the list).




See Also ...

Topics

DOC_aliases Aliases
DOC_keypad Keypad navigation
DOC_macros Macro keys

Function

FNC_Accelerator Accelerator (Add or modify an accelerator key (keystroke to command mapping))

(Help topic: function=AcceleratorList)

DOC_contents Documentation contents page