Two possible routes:
(a1) Set the input to be an OEM trigger with code 301
(a2) Use the SetTriggerMacro in your initialisation to link all
buttons with 301 into a given macro (say M991.m1s)
(a3) In this macro put the code you want your button to execute.
or
(b1) Inspect the input with a IsActive(ss) call in a Macropump and
if
so do your own code.
(a) is messy because of all the steps setting it up and the fact
that
the macro needs to find which input caused it to run (if you have
several. (b) is messy because you usually have to notice changes
of
the input as you will not want to run the code everytime the
Macropump runs - only when the button goes down (or sometimes up)
Have a look at section 4.2 of
for the OEM trigger technique and
for the Macropump. Bot relate to inputs via ModIO but there is
nothing special other than defining the input port as 0 rather
than 1
or 2.
Let me know if you need more detailed pointers
John Prentice
John: Thanks. I read and posted to Art's response and then read
yours. I'll have a look at both your approaches. I just assumed
there would be a easy way to run custom buttons you can
write....silly me!!