home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 November
/
VPR9711A.ISO
/
VPR_DATA
/
Special
/
Tmedt180
/
tmedt180.exe
/
TM_MI.CWS
< prev
next >
Wrap
Text File
|
1997-08-25
|
18KB
|
518 lines
@echo off
#----------------------------------#
# メインウィンンドのハンドルを取得 #
#----------------------------------#
window get main -&eax
let hwndMain=%eax%
#----------------------#
# 以前のリソースを削除 #
#----------------------#
menubar get %hwndMain% -&eax
let hMenu=%eax%
menubar set %hwndMain% 0
menubar destory %hMenu%
menubar draw %hwndMain%
menubar getpopup %hwndMain% -&eax
let hPopMenu=%eax%
menubar destory %hPopMenu%
toolbar get %hwndMain% -&eax
let hTBar=%eax%
toolbar destory %hTBar%
functionkey get %hwndMain% -&eax
let hFKey=%eax%
functionkey destroy %hFKey%
accelkey get %hwndMain% -&eax
let hAccel=%eax%
accelkey destroy %hAccel%
strokekey get %hwndMain% -&eax
let hStroke=%eax%
strokekey destroy %hStroke%
#------------------#
# 表示属性を決める #
#------------------#
let @ Hex = %hwndMain% ^| 0
setwindowpos %Hex% 0 0 0 640 480 0006
console size 0
window sdi
toolbar hide
functionkey show
console scrollbar horz hide
console scrollbar vert show
edit scrollbar horz hide
edit scrollbar vert show
edit mode noline
edit mode noruler
window get edit -&eax
window set focus %eax%
#mode edit font "-f:FixedSys"
mode edit color -fg:0xFFFFFF -bg:0x800000 -ctl:0x00FFFF
#--------------------#
# メニューバーの登録 #
#--------------------#
menubar create -&eax
let hMenu=%eax%
menubar createpopup -&eax
let hPopMenu=%eax%
menubar append %hMenu% 0x0010 %hPopMenu% "ファイル(&F)"
menubar append %hPopMenu% 0x0000 "tmQuit" "(&E)Save && Quit :現テキストのセーブと編集終了"
menubar append %hPopMenu% 0x0000 "tmSave" "(&S)Save :現テキストのセーブ 編集は継続"
menubar append %hPopMenu% 0x0000 "tmQuit" "(&Q)Quit :現テキストの強制的な編集終了"
menubar append %hPopMenu% 0x0001 "tmDummy" "(&B)Backup file :バックアップ[作成/非作成]"
menubar append %hPopMenu% 0x0001 "tmDummy" "(&M)Margin save :特殊ファイルに表示イメージでセーブ"
menubar append %hPopMenu% 0x0001 "tmDummy" "(&O)Original file :現テキストの編集を最初からやり直す""
menubar append %hPopMenu% 0x0800 -1 0
menubar append %hPopMenu% 0x0001 "tmDummy" "(&D)Duplicate :現テキストの二重化"
menubar append %hPopMenu% 0x0001 "tmDummy" "(&P)Split text :現テキストの2分割表示"
menubar append %hPopMenu% 0x0001 "tmDummy" "(&R)Rename :現テキストのパス名変更"
menubar append %hPopMenu% 0x0800 -1 0
menubar append %hPopMenu% 0x0000 "tmQuit" "(&A)All Save && End :全テキストのセーブとエディタ終了"
menubar append %hPopMenu% 0x0000 "tmQuit" "(&0)End :強制的なエディタ終了"
menubar append %hPopMenu% 0x0800 -1 0
menubar append %hPopMenu% 0x0001 "tmDummy" "(&I)Insert file :カーソル行の前にファイルを読み込む"
menubar append %hPopMenu% 0x0800 -1 0
menubar append %hPopMenu% 0x0000 "tmRead" "(&F)Open for read :参照用にファイルをオープンする"
menubar append %hPopMenu% 0x0000 "tmOpen" "(&N)New file :新しいファイルの編集"
menubar createpopup -&eax
let hPopMenu=%eax%
menubar append %hMenu% 0x0010 %hPopMenu% "移動(&M)"
menubar append %hPopMenu% 0x0000 "tmTop" "(&T)Top of text :テキストの最初の行へ"
menubar append %hPopMenu% 0x0000 "tmJump" "(&G)Goto line :指定する行番号の行へ"
menubar append %hPopMenu% 0x0800 -1 0
menubar append %hPopMenu% 0x0000 "tmUndo" "(&U)Undo :直前の削除/カット/ペーストのアンドゥ"
menubar append %hPopMenu% 0x0001 "tmDummy" "(&J)Tag Jump :タグジャンプ/バック・タグジャンプ"
menubar append %hPopMenu% 0x0000 "tmBottom" "(&B)Bottom of text :テキストの最後の行へ"
menubar createpopup -&eax
let hPopMenu=%eax%
menubar append %hMenu% 0x0010 %hPopMenu% "状態(&C)"
menubar createpopup -&eax
let hPop2Menu=%eax%
menubar append %hPopMenu% 0x0010 %hPop2Menu% "(&E)Extension :拡張メニュー"
menubar append %hPop2Menu% 0x0001 "tmDummy" "(&R)Rool up/dn :ROOL UP/DOWN 動作[ジャンプ/スムース]"
menubar append %hPop2Menu% 0x0000 "tmCtlColor" "(&E)[EOF] Disp :[EOF}マーク[表示/非表示]"
menubar append %hPop2Menu% 0x0001 "tmDummy" "(&K)Key click :クリック音[OFF/ON]"
menubar append %hPop2Menu% 0x0001 "tmDummy" "(&2)Screen mode :画面モード[20,31行/25行]"
menubar append %hPop2Menu% 0x0001 "tmDummy" "(&A)Change alph :[大文字へ/小文字へ]"
menubar append %hPop2Menu% 0x0001 "tmDummy" "(&C)Compare :ファイル比較モード[OFF/ON]"
menubar append %hPop2Menu% 0x0001 "tmDummy" "(&G)Guideline :ガイドライン表示[行桁/文字コード]"
menubar append %hPop2Menu% 0x0001 "tmDummy" "(&N)Number type :左側行番号[論理番号/表示番号]"
menubar append %hPop2Menu% 0x0001 "tmDummy" "(&F)Free Cursor :フリーカーソルモード[OFF/ON]"
menubar append %hPop2Menu% 0x0001 "tmDummy" "(&P)Stop mode :行端カーソル[止まらず/止まる]"
menubar append %hPop2Menu% 0x0001 "tmDummy" "(&V)Vertical ln :バーチカルライン[OFF/ON]"
menubar append %hPop2Menu% 0x0001 "tmDummy" "(&Y)Memo mark :セーブ時のメモマーク[有効/無効]"
menubar append %hPop2Menu% 0x0000 "tmDisp" "(&H)Hard Tab :デフォルト・ハードタブの変更"
menubar append %hPop2Menu% 0x0001 "tmDummy" "(&L)Lines/page :1頁あたりの表示桁数"
menubar append %hPop2Menu% 0x0001 "tmDummy" "(&S)Scroll marg :スクロール・マージン"
menubar append %hPopMenu% 0x0800 -1 0
menubar append %hPopMenu% 0x0001 "tmDummy" "(&S)Split :スプリット形状[上下/左右]"
menubar append %hPopMenu% 0x0000 "tmLine" "(&N)Number :行番号[非表示/表示]"
menubar append %hPopMenu% 0x0001 "tmDummy" "(&C)Column :桁位置ゲージ[非表示/表示]"
menubar append %hPopMenu% 0x0000 "tmIndent" "(&I)Auto indent :オートインデント[OFF/ON]"
menubar append %hPopMenu% 0x0001 "tmDummy" "(&D)Dual scroll :両画面スクロール[OFF/ON]"
menubar append %hPopMenu% 0x0001 "tmDummy" "(&U)Underline :カーソル行アンダーライン[OFF/ON]"
menubar append %hPopMenu% 0x0000 "tmCtlColor" "(&R)CR,LF disp :改行文字[表示/非表示]"
menubar append %hPopMenu% 0x0000 "tmCtlColor" "(&T)TAB disp :タブ文字&全角スペース[非表示/表示]"
menubar append %hPopMenu% 0x0001 "tmDummy" "(&L)Left margin :コード825FHでの左マージン[無効/有効]"
menubar append %hPopMenu% 0x0000 "tmDisp" "(&G)Margin(def) :デフォルト右マージンの変更"
menubar append %hPopMenu% 0x0000 "tmDisp" "(&M)Margin(tmp) :デフォルト右マージンの変更"
menubar createpopup -&eax
let hPopMenu=%eax%
menubar append %hMenu% 0x0010 %hPopMenu% "実行(&R)"
menubar append %hPopMenu% 0x0000 "tmExec" "(&S)Console :コマンドの実行"
menubar createpopup -&eax
let hPopMenu=%eax%
menubar append %hMenu% 0x0010 %hPopMenu% "検索(&S)"
menubar append %hPopMenu% 0x0000 "tmFind" "(&F)Find Forword :文字列の前方↓検索"
menubar append %hPopMenu% 0x0000 "tmFind" "(&B)Find Backword :文字列の後方↑検索"
menubar append %hPopMenu% 0x0001 "tmDummy" "(&G)Global Search :グローバル検索の実行"
menubar append %hPopMenu% 0x0001 "tmDummy" "(&M)Find Mode :英大・小文字[区別/同一視]"
menubar append %hPopMenu% 0x0001 "tmDummy" "(&X)eXtended Search :特殊検索の指定[有効/無効]"
menubar append %hPopMenu% 0x0800 -1 0
menubar append %hPopMenu% 0x0000 "tmChng" "(&Q)Replace Query :文字列の連続置換:確認あり"
menubar append %hPopMenu% 0x0001 "tmDummy" "(&A)Replace All :文字列の連続置換:確認なし"
menubar append %hPopMenu% 0x0001 "tmDummy" "(&R)Replace Range :文字列の連続置換:範囲指定"
menubar append %hPopMenu% 0x0001 "tmDummy" "(&C)Replace Continue :前回の連続置換の再実行"
menubar createpopup -&eax
let hPopMenu=%eax%
menubar append %hMenu% 0x0010 %hPopMenu% "ヘルプ(&H)"
menubar append %hPopMenu% 0 "tmContent" "目次(&C)"
menubar append %hPopMenu% 0x0800 -1 0
menubar append %hPopMenu% 0 "tmAbout" "バージョン情報(&A)..."
menubar append %hPopMenu% 0 "tmRegist" "ユーザー登録(&R)..."
menubar set %hwndMain% %hMenu%
menubar draw %hwndMain%
#--------------------------#
# ファンクションキーの登録 #
#--------------------------#
functionkey create -&eax
let hFKey=%eax%
functionkey append %hFKey% 0x00 0x70 "tmMenu1" "メニュー1"
functionkey append %hFKey% 0x00 0x71 "tmWndw" "メニュー2"
functionkey append %hFKey% 0x00 0x72 "tmMenu3" "メニュー3"
functionkey append %hFKey% 0x00 0x73 "tmConSizeUp" "画面割"
functionkey append %hFKey% 0x00 0x74 "tmFindRight" "検索↓"
functionkey append %hFKey% 0x00 0x75 "tmBlock" "行選択"
functionkey append %hFKey% 0x00 0x76 "tmCut" "カット"
functionkey append %hFKey% 0x00 0x77 "tmCopy" "コピー"
functionkey append %hFKey% 0x00 0x78 "tmPaste" "行ペスト"
#functionkey append %hFKey% 0x00 0x79 "tmDummy" "タグJP"
functionkey append %hFKey% 0x04 0x70 "tmMenu4" "メニュー4"
functionkey append %hFKey% 0x04 0x71 "tmMenu5" "メニュー5"
functionkey append %hFKey% 0x04 0x72 "tmMenu6" "メニュー6"
functionkey append %hFKey% 0x04 0x73 "tmConSizeDown" "境界換"
functionkey append %hFKey% 0x04 0x74 "tmFindLeft" "検索↑"
#functionkey append %hFKey% 0x04 0x75 "tmDummy" "文選択"
#functionkey append %hFKey% 0x04 0x76 "tmDummy" "AZ実行"
#functionkey append %hFKey% 0x04 0x77 "tmDummy" "AZ実行"
#functionkey append %hFKey% 0x04 0x78 "tmDummy" "文ペスト"
#functionkey append %hFKey% 0x04 0x79 "tmDummy" "行2重"
#----------------------------#
# アクセラレーターキーの登録 #
#----------------------------#
accelkey create -&eax
let hAccel=%eax%
let @ flags = 0x09 ; let @ key = Q:0
accelkey append %hAccel% %flags% "tmStroke" %key%
let @ flags = 0x09 ; let @ key = E:0
accelkey append %hAccel% %flags% "tmUp" %key%
let @ flags = 0x09 ; let @ key = X:0
accelkey append %hAccel% %flags% "tmDown" %key%
let @ flags = 0x09 ; let @ key = S:0
accelkey append %hAccel% %flags% "tmLeft" %key%
let @ flags = 0x09 ; let @ key = D:0
accelkey append %hAccel% %flags% "tmRight" %key%
let @ flags = 0x09 ; let @ key = C:0
accelkey append %hAccel% %flags% "tmPageDown" %key%
let @ flags = 0x09 ; let @ key = R:0
accelkey append %hAccel% %flags% "tmPageUp" %key%
let @ flags = 0x09 ; let @ key = F:0
accelkey append %hAccel% %flags% "tmWordRight" %key%
let @ flags = 0x09 ; let @ key = A:0
accelkey append %hAccel% %flags% "tmWordLeft" %key%
let @ flags = 0x09 ; let @ key = G:0
accelkey append %hAccel% %flags% "tmDelete" %key%
let @ flags = 0x09 ; let @ key = H:0
accelkey append %hAccel% %flags% "tmBack" %key%
let @ flags = 0x09 ; let @ key = Y:0
accelkey append %hAccel% %flags% "tmCut" %key%
let @ flags = 0x09 ; let @ key = L:0
accelkey append %hAccel% %flags% "tmPaste" %key%
accelkey set %hwndMain% %hAccel%
#------------------------#
# 2ストロークキーの登録 #
#------------------------#
strokekey create -&eax
let hStroke=%eax%
let @ flags = 0x01 ; let @ key = S:0
strokekey append %hStroke% %flags% "tmHome" %key%
let @ flags = 0x01 ; let @ key = D:0
strokekey append %hStroke% %flags% "tmEnd" %key%
let @ flags = 0x01 ; let @ key = R:0
strokekey append %hStroke% %flags% "tmTop" %key%
let @ flags = 0x01 ; let @ key = C:0
strokekey append %hStroke% %flags% "tmBottom" %key%
let @ flags = 0x01 ; let @ key = F:0
strokekey append %hStroke% %flags% "tmFindRight" %key%
let @ flags = 0x01 ; let @ key = B:0
strokekey append %hStroke% %flags% "tmFindLeft" %key%
let @ flags = 0x01 ; let @ key = U:0
strokekey append %hStroke% %flags% "tmUndo" %key%
let @ flags = 0x01 ; let @ key = W:0
strokekey append %hStroke% %flags% "tmLine" %key%
let @ flags = 0x01 ; let @ key = H:0
strokekey append %hStroke% %flags% "tmExec" %key%
strokekey set %hwndMain% %hStroke%
#------------#
# メッセージ #
#------------#
echo ^#**************************************************************^#
echo ^# ToolMan Editor Ver 1.80 Copyright (c) 1995-97 M.Maedera(JPN) ^#
echo ^# (Mifes like mode) ^#
echo ^# If you have any question, please input "help[enter]." ^#
echo ^#**************************************************************^#
return
#======================================================================
#--------------#
# プロシジャー #
#--------------#
#----------------------------------------------------------------------
proc tmDummy
echo not implement
return
#----------------------------------------------------------------------
proc tmMenu1
menubar trackpopup 0
return
#----------------------------------------------------------------------
proc tmMenu3
menubar trackpopup 1
return
#----------------------------------------------------------------------
proc tmMenu4
menubar trackpopup 2
return
#----------------------------------------------------------------------
proc tmMenu5
menubar trackpopup 3
return
#----------------------------------------------------------------------
proc tmMenu6
menubar trackpopup 4
return
#----------------------------------------------------------------------
proc tmOpen
edit open
return
#----------------------------------------------------------------------
proc tmSave
edit save
return
#----------------------------------------------------------------------
proc tmRead
edit open ;edit mode view
return
#----------------------------------------------------------------------
proc tmExec
console size 128
window get console -&eax
window set focus %eax%
return
#----------------------------------------------------------------------
proc tmQuit
exit
return
#----------------------------------------------------------------------
proc tmCtlColor
mode edit color -ctl
return
#----------------------------------------------------------------------
proc tmLine
if "%tm.edt.line%" == "1" then
set tm.edt.line=0
edit mode noline
else
set tm.edt.line=1
edit mode line
endif
return
#----------------------------------------------------------------------
proc tmIndent
if "%tm.edt.indent%" == "1" then
set tm.edt.indent=0
edit mode noindent
else
set tm.edt.indent=1
edit mode indent
endif
return
#----------------------------------------------------------------------
proc tmDisp
mode edit disp
return
#----------------------------------------------------------------------
proc tmJump
edit -f jump
return
#----------------------------------------------------------------------
proc tmContent
window help
return
#----------------------------------------------------------------------
proc tmRegist
window regist
return
#----------------------------------------------------------------------
proc tmAbout
window about
return
#----------------------------------------------------------------------
proc tmWndw
window get focus -&eax
window get console -&ebx
window get edit -&ecx
if %eax% == %ebx% then
window set focus %ecx%
else
window set focus %ebx%
endif
return
#----------------------------------------------------------------------
proc tmConSizeUp
console size +16
return
#----------------------------------------------------------------------
proc tmConSizeDown
console size -16
return
#----------------------------------------------------------------------
proc tmFind
edit -f find
return
#----------------------------------------------------------------------
proc tmChng
edit -f replace
return
#----------------------------------------------------------------------
proc tmPaste
edit -f select paste
return
#----------------------------------------------------------------------
proc tmBlock
window get edit -&eax
window get focus -&ebx
if (%eax% == %ebx%) then
if "%tm.edt.sel%" == "1" then
set tm.edt.sel=0
edit select end
else
set tm.edt.sel=1
edit select start
endif
else
if "%tm.con.sel%" == "1" then
set tm.con.sel=0
console select end
else
set tm.con.sel=1
console select start
endif
endif
return
#----------------------------------------------------------------------
proc tmFindLeft
edit -f find left
return
#----------------------------------------------------------------------
proc tmFindRight
edit -f find right
return
#----------------------------------------------------------------------
proc tmCopy
edit -f select copy ;edit -f select end
return
#----------------------------------------------------------------------
proc tmUp
edit -f cursor up
return
#----------------------------------------------------------------------
proc tmDown
edit -f cursor down
return
#----------------------------------------------------------------------
proc tmLeft
edit -f cursor left
return
#----------------------------------------------------------------------
proc tmRight
edit -f cursor right
return
#----------------------------------------------------------------------
proc tmWordLeft
edit -f cursor left word
return
#----------------------------------------------------------------------
proc tmWordRight
edit -f cursor right word
return
#----------------------------------------------------------------------
proc tmBack
edit -f backspace
return
#----------------------------------------------------------------------
proc tmDelete
edit -f delete
return
#----------------------------------------------------------------------
proc tmUndo
edit -f undo
return
#----------------------------------------------------------------------
proc tmPageUp
edit -f cursor up page
return
#----------------------------------------------------------------------
proc tmPageDown
edit -f cursor down page
return
#----------------------------------------------------------------------
proc tmStroke
strokekey start
return
#----------------------------------------------------------------------
proc tmHome
edit -f cursor home
return
#----------------------------------------------------------------------
proc tmEnd
edit -f cursor end
return
#----------------------------------------------------------------------
proc tmTop
edit -f cursor set 1 1
return
#----------------------------------------------------------------------
proc tmBottom
edit -f cursor set 1 0
return
#----------------------------------------------------------------------