It's all about your architecture!
What about this: Make sure your application works without any GUI at all! Control the complete application using messages sent from a script orso. So a message could contain some code for 'functionality #1' and somewhere else you link a certain button to this functionality. When you execute that message you send out an event like EVENT_BUTTONCHANGE. Then due all the eventhook things the actual button will see that he's the chosen one, and will readout the functionality #1 state and change accordingly so.
So uhm (still with me? :P) this way you can have your functionality by either pressing a button or performing a script. By seperating this functionality from the GUI implementation you're somewhat multi-platform compatible. As in, the only thing you need to code on a not-supported platform is the interface, the functionality is still the same, as scripts don't change.
ok, dinner-time ^_^
What about this: Make sure your application works without any GUI at all! Control the complete application using messages sent from a script orso. So a message could contain some code for 'functionality #1' and somewhere else you link a certain button to this functionality. When you execute that message you send out an event like EVENT_BUTTONCHANGE. Then due all the eventhook things the actual button will see that he's the chosen one, and will readout the functionality #1 state and change accordingly so.
So uhm (still with me? :P) this way you can have your functionality by either pressing a button or performing a script. By seperating this functionality from the GUI implementation you're somewhat multi-platform compatible. As in, the only thing you need to code on a not-supported platform is the interface, the functionality is still the same, as scripts don't change.
ok, dinner-time ^_^