Trigger Button

BlitzMax Forums/BlitzMax Beginners Area/Trigger Button

po(Posted 2007) [#1]
In MaxGUI: Is there a way I can tell my program to 'click' a button on its own? The reason I want to do that is there is code that I want to trigger under a button pushed event. I want the program to do it automatically.


Dreamora(Posted 2007) [#2]
you can't tell it to click it. But you can create an event that will make your own event handling routines believe that it was clicked


H&K(Posted 2007) [#3]
@Dream, couldnt you post events to "move the mouse" over the button, then post a click?


po(Posted 2007) [#4]
Ok, thanks.


GfK(Posted 2007) [#5]
Put your code in a separate Function.

When you click a button, call the Function. When you want to run the same code without the user pressing the button, call the same Function.


Gabriel(Posted 2007) [#6]
http://www.blitzbasic.com/codearcs/codearcs.php?code=1943 ?