Is it possible MATLAB be associated with FireFox and InternetExplorer
4 views (last 30 days)
Show older comments
Is it possible MATLAB be associated with FireFox and InternetExplorer when opening an .html file that contains hyperlinks parts? and while clicking on them(hyperlinks parts that are in the .html file) in built matlab browser, some command be done, so it could be done the commands by clicking on them in IE and FireFox.
i could open that file by IE (could not open by FireFox) with this commands:
myUrl = 'c:\d.html';
ieCmd = ['iexplore ' myFile];
ffCmd = ['firefox ' myFile]; % not works
system(ieCmd);
system(ffCmd); %not works
but there is no association between MATLAB and IE
5 Comments
Fangjun Jiang
on 25 Sep 2011
This is about IE or FireFox regarding how to run a third application from IE or FireFox, like you click a video or mp3 file link in IE or FireFox, it will bring up the video player or mp3 player. I am not sure if the hyper-link you have is the right format.
Answers (2)
Jan
on 25 Sep 2011
No. I'm sure to 98% that such a call of external programs is impossible. It would be a giantic reduction of security if a link can have this power. Assume the program is "del %USERPROFILE%\*.*" !
But as far as I know there are enough security problems in the Internet Explorer. But I would not try to used them to control an application on purpose.
But I do not think, that using FireFox as remote GUI of MATLAB is a good idea at all. It seems to be too indirect to be intuitive. A MATLAB GUI is the perfect way to control MATLAB.
4 Comments
Jan
on 25 Sep 2011
Read the chapter "Creating Graphical User Interfaces" in the documentation. Of course, reading the documentation is always a very good idea, if you want to use such a powerful tool as MATLAB.
A short demo: Type "demo" in the command line, and search the GUI demo.
Fangjun Jiang
on 25 Sep 2011
MATLAB interprets the hyperlink '<a href="matlab: plot(magic(10))">plot</a>' as to run the plot() command, whether it is in the Command Window, or the built-in MATLAB web() browser. This is the capability provided by MATLAB.
I think it is possible to make something similar happen in IE. I've seen an .html file, when double clicked, brings up the html page in IE, allow user to make some selection using pop-up menu, and then execute some DOS batch file. I just don't have enough HTML experience at this time to come up with an example. I might be able to find that example and learn about it.
That said, I agree with Jan Simon that this is not a good way to implement your user interface. Even if you are able to make IE interpret "matlab:plot()" as to open MATLAB and then run the plot command, you probably will have problem regarding multiple instances of MATLAB being brought up, multiple versions of MATLAB being brought up, etc.
There are easy alternatives to avoid using html as the user interface, as Jan suggested, develop a GUI using GUIDE is not that hard.
UPDATE
I did a follow-up on the html file I saw that can run a DOS batch file. It contains Visual Basic scripts. So it's not an option here.
4 Comments
See Also
Categories
Find more on Files and Folders in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!