Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Trouble using Mex file for external window switching

1 visualizzazione (ultimi 30 giorni)
Madhu Kodappully
Madhu Kodappully il 13 Ott 2015
Chiuso: MATLAB Answer Bot il 20 Ago 2021
Here is a matlab code that employs ctrlWindow.mexw64 file.
In the code below, Window Name 1 is generated by program1.exe. Window Name 2 is generated by MATLAB GUI. When I click F9 after selecting the entire code, I am able to see windows getting switched. works great. But on the same code, when I do F5 (run), there is window identification issue. MATLAB throws an error message "can not find the window!!!". Any thoughts? One more clue : The mex file is generated in R2012a and I am using it in R2010a. The code work either ways in R2012a system.
% code begins
!program1.exe
ctrlWindow('Window Name 1',3); % this maximizes this window
pause(1)
ctrlWindow('Window Name 1',0); % this hides the window
pause(1)
ctrlWindow('Window Name 2',3); % Maximizes
pause(1)
ctrlWindow('Window Name 2',0); % hides
pause(1)

Risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by