How to go to the next line in case of using 'system' command ?

I am trying to run the program by using 'system' command and then move the mouse cursor and click on it.I can open the program by using 'system' command but it does not follow the next line in the code unless I close the program. I would like to move the mouse cursor without closing the program. How can I stop the 'system ' command after I used it ?

 採用された回答

TAB
TAB 2012 年 6 月 5 日

0 投票

Try
>> system('YourCommand &')

4 件のコメント

Muharrem Askin
Muharrem Askin 2012 年 6 月 5 日
The line is like that.
system(' "C:\Documents and Settings\guestaskin\Desktop\model\idling1.$PJ" ') ;
How can I use system('YourCommand &') and what is my command here ?
I tried one of these commands and it looks like it works but I have no idea about how it works
system('start "bar" "C:\Documents and Settings\guestaskin\Desktop\model\idling1.$PJ"') ;
system('start "foo" "C:\Documents and Settings\guestaskin\Desktop\model\idling1.$PJ"') ;
TAB
TAB 2012 年 6 月 5 日
Which OS you are using?
Muharrem Askin
Muharrem Askin 2012 年 6 月 5 日
windows XP professional
TAB
TAB 2012 年 6 月 5 日
You can put the line as
system(' "C:\Documents and Settings\guestaskin\Desktop\model\idling1.$PJ" &') ;
OR
If your program file (idling1.$PJ) can be executed by double click on it, then you can use
>> winopen('C:\Documents and Settings\guestaskin\Desktop\model\idling1.$PJ');
winopen() is equivalent to double clicking on a file.

サインインしてコメントする。

その他の回答 (1 件)

Muruganandham Subramanian
Muruganandham Subramanian 2012 年 6 月 5 日

0 投票

Hi askin,
Did you use the 'home ' command. I think it'll work, just try it.

1 件のコメント

Muharrem Askin
Muharrem Askin 2012 年 6 月 5 日
I didnt understand the function of 'home' command here. In the help file it says it is used to Move
cursor to upper-left corner of Command Window.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeInteractive Control and Callbacks についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by