Created the accelerators.xml file
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<muclient>
<plugin
name="Accelerators"
author="Nick Gammon"
id="bcd4c85623b51c11ec643123"
language="Lua"
purpose="Add custom keystrokes"
date_written="2007-04-17 16:16:25"
requires="3.80"
version="1.0"
>
</plugin>
<script>
<![CDATA[
function OnPluginInstall ()
AcceleratorTo ("Ctrl+w" , "", sendto.script )
AcceleratorTo ("Ctrl+t" , "", sendto.script )
AcceleratorTo ("Ctrl+r" , "", sendto.script )
AcceleratorTo ("Ctrl+f" , "", sendto.script )
AcceleratorTo ("Ctrl+g" , "", sendto.script )
AcceleratorTo ("Ctrl+u" , "", sendto.script )
AcceleratorTo ("Ctrl+l" , "", sendto.script )
AcceleratorTo ("Ctrl+n" , "", sendto.script )
-- add more here ...
-- list them
for _, v in ipairs (AcceleratorList ()) do Note (v) end
end -- function OnPluginInstall
]]>
</script>
</muclient>
But upon installing the plugin, this message appears:
Error number: 0
Event: Run-time error
Description: [string "Plugin"]:15: bad argument #1 to 'ipairs' (table expected, got nil)
stack traceback:
[C]: in function 'ipairs'
[string "Plugin"]:15: in function <[string "Plugin"]:1>
Called by: Function/Sub: OnPluginInstall called by Plugin Accelerators
Reason: Executing plugin Accelerators sub OnPluginInstall
|