■ 質問はここへ ■

前へ 次へ
No. 1195 (1194へのコメント)投稿者: Aone日付: 2004/04/09 02:15:04
題名 : 複数テキストメモマクロ(1)

' 複数テキストメモマクロ
' 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

次へ
現在の既読番号は 0  既読を


メールアドレスを表示するにはURLの後ろに &m=581f1189 をつけてください。
ユーザー フォーラム一覧

http://www2k.biglobe.ne.jp/~araken/
http://0ban.com/araken/