How do I wait for an appdesigner pushbutton press from a script
33 次查看(过去 30 天)
显示 更早的评论
I have created a matlab script which calls an app designer gui. The gui has a selection of raido buttons to select a system frequency to be simulated. I want to pause the script until a I've pushed a SUBMIT button that is in the GUI.
I am getting the app handle and button handle ok from the script and have it working waiting onthe closure of the gui using the waitfor() function but I can't seem to get it to waif for the gui Button to be pressed.
clear all;
close all;
global modFreq; % system Freq set in GUI from radio button
%%instantiate my gui
guiHandle = mySystemConfigGui;
buttonHandle = guiHandle.RunButton;
%
waitfor(guiHandle);
fprintf('continuing script..\n');
How do I wait for an appdesigner pushbutton press from a script
0 个评论
采纳的回答
Aylin
2016-12-27
Hello Gary,
You can use the uiwait function with the uiresume function instead of the waitfor function in order to pause execution while waiting for a button press. Please see the uiwait documentation page for an example:
https://www.mathworks.com/help/matlab/ref/uiwait.html
Note that you may have to register a new callback function in the button in order to run the uiresume function.
Rylan
0 个评论
更多回答(2 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!