I think this should work...
In the Ports and Pins config menu, go to inputs, select an input or an OEM trigger, put your pin and port settings for the switch you are using, and assign a hotkey to that input. Now go and create a button on screendesigner, make that button run the sI thicript you want and assign that buttin the same hotkey you set on the input ports and pins. I think its in the ScanCode box. Now if you dont want that button to show up on your screen use screen designer to drag the button out of the workarea.
I think that might work, havent tried it, please let me know.
Regards
Fernando