Disclaimer: I never use GUIDE. However, to know what I miss, I sometimes try it.
Assumtion: you use GUIDE.
Here is one way of achieving an automatic "push" directly after the start of the app.
- In GUIDE assign a unique string value, e.g. tag_of_your_button, to the property, Tag, of your pushbutton.
- write a four line script (or rather function), which starts your app and "pushes" the button. The lines are:
fh = name_of_your_app;
uih = findobj( fh, 'Tag', 'tag_of_your_button' );
foo_handle = get( uih, 'Callback' );
foo_handle( uih, event_data )
- You may use the variable, event_data, to pass some data to the callback_function. Or pass a dummy value.
- Tell the users to use your script to start the app
Not that obvious :-(
This script will probably need some error handling not to cause you embarrassment.
- assert that fh is not empty and is a figure handle
- assert that uih is a pushbutton handle
- assert that foo_handle if a function handle