'フリータブ / Ver. 0.50 / by Kabuneko 2001/06/06 proc main 'タブ挿入 if @hwnd = 0 then exit proc dim n, t, t$ n = 1 do while 1 t$ = mid$(@@global$("tabs"),n,2) if t$ = "" then exit proc t = val("&h" + t$) if t > @BytePosCr then exit do n = n + 2 loop @Insert space$(t - @BytePosCr) end proc proc GetTab 'タブ位置取得 if @hwnd = 0 then exit proc '半角スペースだけの行のタブ位置に # を入れたものをつくり 'その行の上にカーソルを置いて位置を取得します '# の数は10個まで dim s$, i, n, t[10] s$ = @TextCr$(@Line) i = 1: n = 1 do while 1 n = instr(n+1,s$,"#") t[i++] = n if n = 0 then exit do 'call msgbox("Found # at " + str$(n)) loop 'ひとつも見つからない場合は終了 if t[1] = 0 then call msgbox("タブ位置設定文字がありません") exit proc end if '数値をグローバル変数に格納 @@global$("tabs") = "" i = 1 do while 1 @@global$("tabs") = @@global$("tabs") + cformat$("%02x",t[i++]) if t[i] = 0 then exit do loop 'print @@global$("tabs") end proc proc PrintSetting '現在のタブ位置吐き出し if @hwnd = 0 then exit proc dim n, t, t$ n = 1 @CharReturn2 do while 1 t$ = mid$(@@global$("tabs"),n,2) if t$ = "" then exit do n = n + 2 t = val("&h" + t$) @Insert space$(t - @BytePosCr) + "#" loop end proc