필터 지우기
필터 지우기

any application closing using matlab

조회 수: 16 (최근 30일)
PK
PK 2012년 11월 28일
댓글: Bachtiar Muhammad Lubis 2019년 2월 7일
hello i want to know if some on have an idea what command to be used to close a ms-word document using matlab or some code to do that task the word document can be at any memory location of the disk and not only word but even for any other application
  댓글 수: 1
Jan
Jan 2012년 11월 28일
Please use dots to separate the sentences. The location of a file on the hard disk does not matter the problem: If you want to kill an application, this works even without an opened file.

댓글을 달려면 로그인하십시오.

답변 (4개)

Vishal Rane
Vishal Rane 2012년 11월 28일
This should help
!taskkill -f -im processname.exe
processname is the one listed in the task manager.
Type "TASKKILL /?" in the windows command prompt for details and more options.
Refer Link and the system command for more information.
  댓글 수: 2
PK
PK 2012년 11월 29일
Hello vishal I did not get what you are trying to say to close a application that is running on the taskbar.
Matlab2010
Matlab2010 2014년 10월 9일
편집: Matlab2010 2014년 10월 9일
dos('taskkill /F /IM acroRd32.exe');

댓글을 달려면 로그인하십시오.


Kaustubha Govind
Kaustubha Govind 2012년 11월 28일
If the open application is a COM server, you might also be able to use the MATLAB COM API (Although I haven't tried this on my end):
h = actxGetRunningServer('Word.Application');
h.Quit();
  댓글 수: 2
PK
PK 2012년 11월 29일
hello Kaustubha Govind this did not work for me and am not asking for a server application but just a simple close ie., using winopen('patch for the document or appliction') can open a file or doc or any application am asking for a command that can close a existing opened file on the taskbar.
Bachtiar Muhammad Lubis
Bachtiar Muhammad Lubis 2019년 2월 7일
is actxGetRunningServer() same with actxserver() ?

댓글을 달려면 로그인하십시오.


Walter Roberson
Walter Roberson 2012년 11월 29일
Java Robot Class to automatically access the taskbar and trigger the commands to kill the task.
There is no simple command to do what you want.

Babak
Babak 2012년 11월 29일
You need to execute a dos command. Here's a piece of MATLAB's help:
Please see the documentation on
status = dos(command)
  댓글 수: 1
Walter Roberson
Walter Roberson 2012년 11월 29일
The dos() command and the system() command earlier suggested are the same thing.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by