Skip to content

Commit 21441bc

Browse files
committed
Source一覧のSourceを追加
1 parent 7c4ca18 commit 21441bc

4 files changed

Lines changed: 93 additions & 0 deletions

File tree

kinds/source.ini

414 Bytes
Binary file not shown.

kinds/source.mac

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**/
2+
3+
4+
5+
#g_dll_ohtorii_tools=val(getarg(30));
6+
$label=getarg(0);
7+
$arg1=getarg(1);
8+
$arg2=getarg(2);
9+
$arg3=getarg(3);
10+
$arg4=getarg(4);
11+
$arg5=getarg(5);
12+
13+
call $label, $arg1, $arg2, $arg3, $arg4, $arg5 ;
14+
endmacro $$return;
15+
16+
17+
do_action:
18+
$$action=$$1;
19+
call $$action;
20+
return $$return;
21+
22+
start:
23+
##first_item_index=0;
24+
$$source=dllfuncstrw(#g_dll_ohtorii_tools, "GetSelectionText", ##first_item_index);
25+
$$arg="";
26+
##ret=dllfuncw(#g_dll_ohtorii_tools,"StartCandidate",$$source,$$arg);
27+
if(##ret){
28+
return "1";
29+
}
30+
return "0";

sources/source.ini

236 Bytes
Binary file not shown.

sources/source.mac

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/* source一覧
2+
3+
引数 ルートフォルダ名
4+
空白の場合はカレントディレクトリを使用する。
5+
*/
6+
7+
#g_dll_ohtorii_tools=val(getarg(30));
8+
$label=getarg(0);
9+
$arg1=getarg(1);
10+
$arg2=getarg(2);
11+
$arg3=getarg(3);
12+
$arg4=getarg(4);
13+
$arg5=getarg(5);
14+
15+
$g_root_macro_directory =dllfuncstrw(#g_dll_ohtorii_tools,"StaticStatusGetRootMacroDirectory");
16+
17+
18+
call $label, $arg1, $arg2, $arg3, $arg4, $arg5;
19+
endmacro $$return;
20+
21+
gather_candidates:
22+
$$root_dir=$$1;
23+
if($$root_dir==""){
24+
//現在実行中のマクロ(このファイル)のディレクトリを調べる
25+
$$root_dir=currentmacrodirectory;
26+
}
27+
28+
##r = dllfuncw(#g_dll_ohtorii_tools, "BeginSource", "source");
29+
if(!##r){
30+
return "0";
31+
}
32+
call AppendFolders $$root_dir;
33+
##r = dllfuncw(#g_dll_ohtorii_tools, "EndSource");
34+
if(!##r){
35+
return "0";
36+
}
37+
38+
return "1";
39+
40+
AppendFolders:
41+
$$root_dir = $$1;
42+
##objFSO = createobject("Scripting.FileSystemObject");
43+
##objFolder = callmethod_returnobj(##objFSO,"GetFolder",$$root_dir);
44+
##objFiles = getpropobj(##objFolder,"Files");
45+
while(1){
46+
##objFile = getcollection(##objFiles);
47+
if(##objFile==0){
48+
break;
49+
}
50+
$$name=getpropstr(##objFile,"Name");
51+
$$basename=member( ##objFSO, "GetBaseName", $$name );
52+
$$ext=tolower(member( ##objFSO, "GetExtensionName", $$name ));
53+
releaseobject ##objFile;
54+
if($$ext!="mac"){
55+
continue;
56+
}
57+
##r=dllfuncw(#g_dll_ohtorii_tools, "AppendCandidate", $$basename, "");
58+
}
59+
releaseobject ##objFiles;
60+
releaseobject ##objFolder;
61+
releaseobject ##objFSO;
62+
63+
return ;

0 commit comments

Comments
 (0)