By diggering around in the registary I was able to find how to create a custom open with command. So when one of my files is clicked it calls matlab.exe -r open('"%1"'). However this always opens a new MATLAB session. I would like it to open in the existing session if there is one. Looking at how .m and .mat are opened in the registary, MATLAB is called from a different location (it has an @ on the font) and it passes a numberic option ( -58 for .m and -59 for .mat). Does anyone know anything about this or what it means?
Creating Custom File Associations
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Gregory
el 22 de Jul. de 2011
I work with data files that have their own file extension. We have created a large set of tools that decodes the data and allows us to perform our analysis. What I am trying to do in is associate this file type with MATLAB, so if I click on one of these files (I am using Windows 7) it will automatically open MATLAB and run the tool on the file.
I have written an open function for my file type which works fine when called from inside MATLAB and I can tell Windows to associate the file type with MATLAB, but when I click on the file it just opens MATLAB (regardless of whether it is already opened) and does nothing. Is there a way to fix this so it knows to run my openxzy function when it is trying to open a .xyz file?
Any help or suggestions are appreciated.
Greg
1 comentario
Respuesta aceptada
Gregory
el 18 de Ag. de 2011
Editada: Gregory
el 19 de Mzo. de 2013
2 comentarios
Carl
el 8 de Feb. de 2013
This is great! I got my custom extension to work fine is Matlab is already up and running.
However if it is not running I immediatly get an error that the file I just clicked was not found, Matlab opens and nothing happens, not even an error message. I think this might be due to the file using programs that are run during the initialisation phase of matlab. Is there a way to postpone the opening of the file until after the init phase is completed?
Más respuestas (0)
Ver también
Categorías
Más información sobre Environment and Settings en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!