Step #1 may not be required as you will be using script, you can have a single button do the work and not have to rely on 2 buttons (except that you must have buttons that contain the IR codes you want to send likely on a hidden page somewhere in your config)
The solution is best solved via ProntoScript and you will be looking at System.setGlobal()/getGlobal() and as you suspected Widget.executeActions() or Widget.scheduleActions().
You can find a sample script that might help you get started by searching for:
power getGlobal
Searching for this.scheduleActions or this.executeActions should point you to some threads to give you an idea how for a button, to both 1) set the global flag and 2) execute the actions of the button you just pressed.
And of course, the first 11 chapters of the David Flanagan Javascript book and the Dev Guide are invaluable resources.
Last edited by Lyndel McGee on October 18, 2010 11:46.