Is it possible MATLAB be associated with FireFox and InternetExplorer

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

Not clear what you are asking for?
@Fangjun, for example there is under command in command window:
sprintf('<a href="matlab: plot(magic(10))">plot</a>')
i put above command in a cell array
(i have more than 60,000 commands like above that i arranged them in a cell)
so i created a HTML file, which can be displayed in the browser, by FEX: cell2html here: http://www.mathworks.com/matlabcentral/fileexchange/4874-cell2html-1-0-r1
cell2html({'<a href="matlab:plot(rand(10))">Plot(rand(10))</a>'}, 'Test.html');
web('Test.html');
now when i open 'Test.html' by Internet Explorer and Firefox and click on that command, IE and FF says there is no association with MATALAB.
How can make this association?
and could also COM server be used for IE?
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.
When 'Test.html' (i told above) be opened by web('Test.html') command in MATLAB, certainly it has association with MATLAB
now is the same thing possible for IE and FF?

Sign in to comment.

Answers (2)

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 let me study about GUI
please give me some references about GUI
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.

Sign in to comment.

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

Thanks a lot Fangjun
i have no Info. about GUI, let me study about it
Starting with Doug's tutorial probably will give you a boost.
http://blogs.mathworks.com/videos/category/gui-or-guide/
Really Thanks a lot Fangjun for updating

Sign in to comment.

Categories

Find more on Historical Contests in Help Center and File Exchange

Asked:

on 24 Sep 2011

Community Treasure Hunt

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

Start Hunting!