Trigger Button
BlitzMax Forums/BlitzMax Beginners Area/Trigger Button
| ||
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. |
| ||
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 |
| ||
@Dream, couldnt you post events to "move the mouse" over the button, then post a click? |
| ||
Ok, thanks. |
| ||
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. |
| ||
http://www.blitzbasic.com/codearcs/codearcs.php?code=1943 ? |