UI Control callback from handles
3 次查看(过去 30 天)
显示 更早的评论
Edit 1: I am not asking for writing a code for a figure. I am already having the figure as a .p file. I am just running it but i want to do some simple clicks on that figure. So, while the figure is running i am starting a timer and finding the figure by the below mentioned code and going until the handle of the figure. Now my question would be how to call that call back so that it emulates the clicks.
Edit 3 : I found out that the figure is getting created by using matlab listdlg function. So, it is a list selection dialog box. So , any idea how to call a list selection dialog box callback functions ?
By using
a = findall(0,'type','figure')
I can get the figure that is currently shown. Now i want to call the callback of the figure by using handles so i do
handles = guihandles(a)
The output of the above line is as below
handles =
struct with fields:
selectall_btn: [1×1 UIControl]
cancel_btn: [1×1 UIControl]
ok_btn: [1×1 UIControl]
listbox: [1×1 UIControl]
When i enter
Edit 2 : handles.ok_btn ----> handles.ok_btn.Callback
handles.ok_btn.Callback
i get below output
2×1 cell array
@doOK
[1×1 UIControl]
My question is how i can call the doOK button callback from this handle ? Is there any other way to manipulate the figure ?
I don't have source code of the figure hence cannot change the figure but would like to automate some simple click buttons. ( I tried by touch events but that is not robust). So is there any way i can do that ?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!