Would it be possible to put in a key combo that would activate/deactivate triggers from the main window? Something like CTRL-SHIFT-T.
Trigger activate/deactivate
Posted by Severian on Mon 24 Sep 2001 10:35 PM — 6 posts, 20,902 views.
To do this you need three steps, because there is no such keystroke built in at present:
What will now happen is that when you press F3 (for example):
Similarly for F4 for disable_triggers.
- Add a couple of small script subs to your script file:
' ---------------------------------------------------------
' Alias to enable all triggers
'
' Alias: enable_triggers
' Label: EnableTriggers
' Script: EnableTriggers
' ---------------------------------------------------------
Sub EnableTriggers (thename, theoutput, thewildcards)
world.setoption "enable_triggers", 1
End Sub
' ---------------------------------------------------------
' Alias to disable all triggers
'
' Alias: disable_triggers
' Label: DisableTriggers
' Script: DisableTriggers
' ---------------------------------------------------------
Sub DisableTriggers (thename, theoutput, thewildcards)
world.setoption "enable_triggers", 0
End Sub
- Make two aliases "enable_triggers" and "disable_triggers" which call those two scripts (see comments above).
- Make two macros (eg. F3 and F4) that send aliases "enable_triggers" and "disable_triggers"
What will now happen is that when you press F3 (for example):
- F3 will send "enable_triggers"
- "enable_triggers" will be caught by the alias
- The script function EnableTriggers will be called. This will turn on that option.
Similarly for F4 for disable_triggers.
Ok, programming skill is nil, and i think i followesed the directions, but it doesnt work, so i obviously didnt.
Little hand holding, please?
Little hand holding, please?
Ah, OK, there are a few places this could go wrong.
First, make sure that scripting is enabled (Configuration -> Scripting) and that the script file in the Scripting tag is pointing to the same file that you put the script functions into.
Check that the aliases are matching, eg. by putting something into the alias that sends something, eg. "think enabling triggers"
Check that the macro keys are calling the aliases (if you do the previous paragraph this should be obvious).
First, make sure that scripting is enabled (Configuration -> Scripting) and that the script file in the Scripting tag is pointing to the same file that you put the script functions into.
Check that the aliases are matching, eg. by putting something into the alias that sends something, eg. "think enabling triggers"
Check that the macro keys are calling the aliases (if you do the previous paragraph this should be obvious).
Did all that, and i get output from my aliases. But it doesnt actually enable or disable triggers.
OK, check the script is being called. In each script routine put in something like:
just before the line "end sub".
world.note "** enabling alias now **"
just before the line "end sub".