===================================================================
RCS file: /home/cvs/OpenXM_contrib2/windows/post-msg-asirgui/asirgui.mac,v
retrieving revision 1.3
retrieving revision 1.9
diff -u -p -r1.3 -r1.9
--- OpenXM_contrib2/windows/post-msg-asirgui/asirgui.mac	2013/11/14 17:21:51	1.3
+++ OpenXM_contrib2/windows/post-msg-asirgui/asirgui.mac	2014/03/28 04:28:02	1.9
@@ -1,5 +1,6 @@
-// $OpenXM: OpenXM_contrib2/windows/post-msg-asirgui/asirgui.mac,v 1.2 2013/11/13 15:43:31 ohara Exp $
+// $OpenXM: OpenXM_contrib2/windows/post-msg-asirgui/asirgui.mac,v 1.8 2013/12/19 04:24:39 takayama Exp $
 // Keep shift-jis code! 
+//   run "cmd /c "+$asirpath+"cmdasir %f" + " >con"; output debugmsg
 call Main;
 endmacro;
 Main:
@@ -8,12 +9,13 @@ $asir_rootdir=getenv("ASIR_ROOTDIR");
 if($asir_rootdir!="" && existfile($asir_rootdir+"\\bin\\asirgui.exe")) {
     $asirpath=$asir_rootdir+"\\bin\\";
 }
-menu "asirgui起動","編集中のファイルの実行","選択範囲の実行","行の実行","選択範囲の実行(paste)","行の実行(paste)";
+menu "asirgui起動","編集中のファイルの実行","選択範囲の実行","行の実行","選択範囲の実行(paste)","行の実行(paste)","計算中断";
 if (result==0) endmacro;
 else if (result == 1) {
   run $asirpath+"asirgui";
 } else if (result == 2) {
-  run "cmd /c "+$asirpath+"cmdasir %f";
+  save ; 
+  run "cmd /c \""+$asirpath+"cmdasir\" %f";
 } else if (result == 3) {
   call ExecuteSelectedArea;
 } else if (result == 4) {
@@ -22,6 +24,8 @@ else if (result == 1) {
   call ExecuteSelectedAreaByPaste;
 } else if (result == 6) {
   call ExecuteSelectedLineByPaste;
+} else if (result == 7) {
+  call AbortAsir;
 }
 return true;
 ExecuteSelectedArea:
@@ -31,7 +35,7 @@ ExecuteSelectedArea:
     $tmp_fname = getenv("TEMP")+"\\cmdasir-tmp-hidemaru.rr";
     run "cmd /c del "+$tmp_fname ;
     call MakeFile $tmp_fname,$s;
-    run "cmd /c "+$asirpath+"cmdasir "+$tmp_fname;
+    run "cmd /c \""+$asirpath+"cmdasir\" "+$tmp_fname;
   } else { 
   message "範囲選択されていません";
   }
@@ -75,7 +79,7 @@ ExecuteSelectedAreaByPaste:
     $tmp_fname = getenv("TEMP")+"\\cmdasir-tmp-hidemaru.rr";
     run "cmd /c del "+$tmp_fname ;
     call MakeFile $tmp_fname,$s;
-    run "cmd /c "+$asirpath+"cmdasir --paste-contents "+$tmp_fname;
+    run "cmd /c \""+$asirpath+"cmdasir\" --paste-contents "+$tmp_fname;
   } else { 
   message "範囲選択されていません";
   }
@@ -86,5 +90,9 @@ ExecuteSelectedLineByPaste:
   golineend;
 //  message(str(seltopx) + "," + str(seltopy) + "," + str(selendx) + "," + str(selendy));
   call ExecuteSelectedAreaByPaste;
+  return true;
+
+AbortAsir:
+  run "\""+$asirpath+"cmdasir\" --abort"+" >nul";
   return true;