=================================================================== RCS file: /home/cvs/OpenXM_contrib2/windows/post-msg-asirgui/asirgui.mac,v retrieving revision 1.2 retrieving revision 1.7 diff -u -p -r1.2 -r1.7 --- OpenXM_contrib2/windows/post-msg-asirgui/asirgui.mac 2013/11/13 15:43:31 1.2 +++ OpenXM_contrib2/windows/post-msg-asirgui/asirgui.mac 2013/11/28 03:02:19 1.7 @@ -1,15 +1,20 @@ -// $OpenXM: OpenXM_contrib2/windows/post-msg-asirgui/asirgui.mac,v 1.1 2013/08/27 05:51:50 takayama Exp $ +// $OpenXM: OpenXM_contrib2/windows/post-msg-asirgui/asirgui.mac,v 1.6 2013/11/27 04:34:04 takayama Exp $ // Keep shift-jis code! +// run "cmd /c "+$asirpath+"cmdasir %f" + " >con"; output debugmsg call Main; endmacro; Main: $asirpath=getenv("HOMEPATH")+"\\Desktop\\asir\\bin\\"; -menu "asirgui起動","編集中のファイルの実行","選択範囲の実行","行の実行","選択範囲の実行(paste)","行の実行(paste)"; +$asir_rootdir=getenv("ASIR_ROOTDIR"); +if($asir_rootdir!="" && existfile($asir_rootdir+"\\bin\\asirgui.exe")) { + $asirpath=$asir_rootdir+"\\bin\\"; +} +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"; + run "cmd /c \""+$asirpath+"cmdasir\" %f"; } else if (result == 3) { call ExecuteSelectedArea; } else if (result == 4) { @@ -18,6 +23,8 @@ else if (result == 1) { call ExecuteSelectedAreaByPaste; } else if (result == 6) { call ExecuteSelectedLineByPaste; +} else if (result == 7) { + call AbortAsir; } return true; ExecuteSelectedArea: @@ -27,7 +34,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 "範囲選択されていません"; } @@ -71,7 +78,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 "範囲選択されていません"; } @@ -82,5 +89,9 @@ ExecuteSelectedLineByPaste: golineend; // message(str(seltopx) + "," + str(seltopy) + "," + str(selendx) + "," + str(selendy)); call ExecuteSelectedAreaByPaste; + return true; + +AbortAsir: + run "\""+$asirpath+"cmdasir\" --abort"+" >null"; return true;