home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 November
/
VPR9711A.ISO
/
VPR_DATA
/
Special
/
Tmedt180
/
tmedt180.exe
/
TM_NP.CWS
< prev
next >
Wrap
Text File
|
1997-08-25
|
7KB
|
249 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%
#------------------#
# 表示属性を決める #
#------------------#
console size 0
window sdi
toolbar hide
functionkey hide
console scrollbar horz show
console scrollbar vert show
edit scrollbar horz show
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: -bg: -ctl:
#--------------------#
# メニューバーの登録 #
#--------------------#
menubar create -&eax
let hMenu=%eax%
menubar createpopup -&eax
let hPopMenu=%eax%
menubar append %hMenu% 0x0010 %hPopMenu% "ファイル(&F)"
menubar append %hPopMenu% 0 "tmNew" "新規作成(&N)"
menubar append %hPopMenu% 0 "tmOpen" "開く(&O)..."
menubar append %hPopMenu% 0 "tmSave" "上書き保存(&S)"
menubar append %hPopMenu% 0 "tmSaveAs" "名前を付けて保存(&A)..."
menubar append %hPopMenu% 0x0800 -1 0
menubar append %hPopMenu% 1 "tmPage" "ページ設定(&T)..."
menubar append %hPopMenu% 0 "tmPrint" "印刷(&P)"
menubar append %hPopMenu% 0x0800 -1 0
menubar append %hPopMenu% 0 "tmExit" "終了(&X)"
menubar createpopup -&eax
let hPopMenu=%eax%
menubar append %hMenu% 0x0010 %hPopMenu% "編集(&E)"
menubar append %hPopMenu% 0 "tmUndo" "元に戻す(&U) Ctrl+Z"
menubar append %hPopMenu% 0x0800 -1 0
menubar append %hPopMenu% 0 "tmCut" "切り取り(&T) Ctrl+X"
menubar append %hPopMenu% 0 "tmCopy" "コピー(&C) Ctrl+C"
menubar append %hPopMenu% 0 "tmPaste" "貼り付け(&P) Ctrl+V"
menubar append %hPopMenu% 0 "tmDelete" "削除(&L) Del"
menubar append %hPopMenu% 0x0800 -1 0
menubar append %hPopMenu% 0 "tmSelect" "すべて選択(&A)"
menubar append %hPopMenu% 0 "tmDate" "日付けと時刻(&D)"
menubar append %hPopMenu% 0x0800 -1 0
menubar append %hPopMenu% 0 "tmWrap" "右端で折り返す(&W)"
menubar createpopup -&eax
let hPopMenu=%eax%
menubar append %hMenu% 0x0010 %hPopMenu% "検索(&S)"
menubar append %hPopMenu% 0 "tmFind" "文字列の検索(&F)..."
menubar append %hPopMenu% 0 "tmNext" "次を検索(&N) F3"
menubar createpopup -&eax
let hPopMenu=%eax%
menubar append %hMenu% 0x0010 %hPopMenu% "ヘルプ(&H)"
menubar append %hPopMenu% 0 "tmHelp" "トピックの検索(&H)"
menubar append %hPopMenu% 0 "tmAbout" "バージョン情報(&A)..."
menubar append %hPopMenu% 0 "tmRegist" "ユーザー登録(&R)..."
menubar set %hwndMain% %hMenu%
menubar draw %hwndMain%
#----------------------------#
# アクセラレーターキーの登録 #
#----------------------------#
accelkey create -&eax
let hAccel=%eax%
let @ flags = 0x09 ; let @ key = H:0
accelkey append %hAccel% %flags% "tmBack" %key%
let @ flags = 0x09 ; let @ key = Z:0
accelkey append %hAccel% %flags% "tmUndo" %key%
let @ flags = 0x09 ; let @ key = X:0
accelkey append %hAccel% %flags% "tmCut" %key%
let @ flags = 0x09 ; let @ key = C:0
accelkey append %hAccel% %flags% "tmCopy" %key%
let @ flags = 0x09 ; let @ key = V:0
accelkey append %hAccel% %flags% "tmPaste" %key%
let @ flags = 0x01 ; let @ key = 0x72 # VK_F3
accelkey append %hAccel% %flags% "tmNext" %key%
accelkey set %hwndMain% %hAccel%
#------------#
# メッセージ #
#------------#
echo ^#**************************************************************^#
echo ^# ToolMan Editor Ver 1.80 Copyright (c) 1995-97 M.Maedera(JPN) ^#
echo ^# (Notepad like Script) ^#
echo ^# If you have any question, please input "help[enter]." ^#
echo ^#**************************************************************^#
return
#======================================================================
#--------------#
# プロシジャー #
#--------------#
#----------------------------------------------------------------------
proc tmNew
edit new
return
#----------------------------------------------------------------------
proc tmOpen
edit open
return
#----------------------------------------------------------------------
proc tmSave
edit save
return
#----------------------------------------------------------------------
proc tmSaveAs
edit saveas
return
#----------------------------------------------------------------------
proc tmPage
echo not implement
return
#----------------------------------------------------------------------
proc tmPrint
echo not implement
return
#----------------------------------------------------------------------
proc tmExit
exit
return
#----------------------------------------------------------------------
proc tmUndo
edit -f undo
return
#----------------------------------------------------------------------
proc tmCut
edit -f select cut
return
#----------------------------------------------------------------------
proc tmCopy
edit -f select copy
return
#----------------------------------------------------------------------
proc tmPaste
edit -f select paste
return
#----------------------------------------------------------------------
proc tmDelete
edit -f select delete
return
#----------------------------------------------------------------------
proc tmSelect
edit -f cursor get max -&eax -&ebx
edit -f cursor set eax ebx
edit -f select start
edit -f cursor set 1 1
edit -f select end
return
#----------------------------------------------------------------------
proc tmDate
echo | date | edit in
echo | edit in
echo | time | edit in
echo | edit in
return
#----------------------------------------------------------------------
proc tmWrap
mode edit disp
return
#----------------------------------------------------------------------
proc tmFind
edit -f find
return
#----------------------------------------------------------------------
proc tmNext
edit -f find right
return
#----------------------------------------------------------------------
proc tmHelp
window help
return
#----------------------------------------------------------------------
proc tmAbout
window about
return
#----------------------------------------------------------------------
proc tmRegist
window regist
return
#----------------------------------------------------------------------
proc tmPrint
edit print
return
#----------------------------------------------------------------------