' 複数テキストメモマクロ ' TxtMemo.mac by Aone type RECT left,top,right,bottom end type
dllname USER cdeclare int MoveWindow(HWND, int, int, int, int, int); const MAX=45 const Text_Dir = "C:\QX\MACRO\テキスト\" proc main dim sel dim item2$[15] dim files$[MAX], item$[MAX], i, fn, in$, a, d$, fd$ item2$[1] = " " item2$[2] = "1| QX" item2$[3] = "2|" item2$[4] = "3| InterNet" item2$[5] = "4| MEMO" item2$[6] = "5| 小説" sel = popupmenu(item2$) if sel = 0 then exit proc if sel = 1 then fd$ = Text_Dir + "01" if sel = 2 then fd$ = Text_Dir + "02" if sel = 3 then fd$ = Text_Dir + "03" if sel = 4 then fd$ = Text_Dir + "04" if sel = 5 then fd$ = Text_Dir + "05" if sel = 6 then fd$ = Text_Dir + "06"
if dir$(fd$, &h10) = "" then mkdir fd$ if dir$(fd$, &h10) = "" then exit proc end if @@FindRegExp = 1 @@FindRegExp = -2 fn = freefile() for i = 1 to MAX files$[i] = cformat$(fd$+"\%02d.txt2", i) if dir$(files$[i]) = "" then item$[i] = chr$(1)+files$[i] open files$[i] for output as #1 close #1 else in$ = "" open files$[i] for input as #fn if not eof(fn) then lineinput #fn, in$ close #fn in$ = trim$(in$) if left$(in$, 1) = "'" then in$ = mid$(in$, 2) elseif left$(in$, 1) = "^[a-zA-z0-9].+$" then in$ = mid$(in$, 10) end if in$ = trim$(in$) if in$ = "" then item$[i] = right$("0"+trim$(str$(i)),2)+"| "+in$+"■未使用■" else item$[i] = right$("0"+trim$(str$(i)),2)+"| "+in$ end if end if next |