#
# NEED_PARMS scope name command
#
# HELP: SYNOPSIS:
# HELP:     generic/register/mouse/runscript scope name command
# HELP:
# HELP: DESCRIPTION:
# HELP:     Register Left Click for running a script
#
DECLARE struct $root.register
DECLARE struct $root.register.mouse
DECLARE struct $root.register.mouse.runscript
DECLARE string $root.register.mouse.runscript.command
DECLARE string $root.register.mouse.runscript.name

IF ${$argv[1]==(void)0}	QUIT
IF ${$argv[2]==(void)0}	QUIT
IF ${$argv[3]==(void)0}	QUIT

CECHO ${$root.register.mouse.runscript.name=(string)$argv[2]}
CECHO ${$root.register.mouse.runscript.command=(string)$argv[3]}

REGISTER ${$root.register.mouse.runscript.name} ${$argv[1]} MOUSE RunScript "Run script at clicked voxel" 0x00000000 0xffffffff p lr 7 ! register/mouse/runscript
RESFLAGS ${$root.register.mouse.runscript.name} ${$argv[1]} MOUSE |7
