|
On Jul 9, 10:31 am, "Eli Chmouni" <echmo...@gmail.com> wrote:
> Hello Nathan
> Thank you for the previous response but i am having some trouble applying it
> i know where the file is located "C:\Program Files\FlightGear\bin\Win32\fgrun.exe"
> but when i use uiopen it just opens another m file with weird symbols but it doesn not load the fllightgear software
> Do you have any comments
>
> Nathan <ngrec...@gmail.com> wrote in message <752b0202-e310-4a22-a3cc-bee9cf788...@12g2000pri.googlegroups.com>...
> > On Jul 9, 9:29?am, "Eli Chmouni" <echmo...@gmail.com> wrote:
> > > Hello Everyone;
> > > I have created a matlab gui that contains several features but the one i am stuck on is the load pushbutton. I have a push button that needs to accomplish the following task; ( when the push button is clicked i want a software on my computer to open). For more details the software is called FLIGHT GEAR (flightgear.org) it is a free flight simulator software. Thus when the user clicks that push button i want flight gear to open. Is that possible? If so what is the code that i need to use
> > > Thank you so much
>
> > Yeah.
> > I do the same thing to open ImageJ with matlab:
>
> > uiopen('C:\Program Files\ImageJ\ImageJ.exe',1)
>
> > If you're not sure where the file is going to be all the time, you can
> > also create a safety net that allows the user to search for the file
> > if it isn't in that specified directory. Here's an example of mine:
>
> > pathname = 'C:\';
> > initialdir = pwd;
> > if exist('C:\Program Files\ImageJ\ImageJ.exe','file')~=0;
> > uiopen('C:\Program Files\ImageJ\ImageJ.exe',1)
> > else
> > [filename, pathname] = uigetfile( ...
> > {'*.exe', 'ImageJ Executable File (*.exe)'; ...
> > '*.*', 'All Files (*.*)'}, ...
> > 'Select ImageJ Executable to be opened',pathname);
> > if isequal([filename,pathname],[0,0]) % Handle "Cancel"
> > buttonpress
> > cd(initialdir);
> > return
> > else
> > uiopen(fullfile(pathname,filename),1);
> > end
> > end
>
> > I hope this helps and works for you.
> > -Nathan
If that one doesn't work, try:
system(full_file_name);
-Nathan
|