home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 November
/
VPR9711A.ISO
/
VPR_DATA
/
Special
/
Tmedt180
/
tmedt180.exe
/
TM_VZ.CWS
< prev
next >
Wrap
Text File
|
1997-08-25
|
17KB
|
544 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:0x000000 -ctl:0xFFFF00
#--------------------#
# メニューバーの登録 #
#--------------------#
menubar create -&eax
let hMenu=%eax%
menubar createpopup -&eax
let hPopMenu=%eax%
menubar append %hMenu% 0x0010 %hPopMenu% "&File"
menubar append %hPopMenu% 0x0000 "tmOpen" "&Open Files"
menubar append %hPopMenu% 0x0000 "tmSaveAs" "&Save as"
menubar append %hPopMenu% 0x0000 "tmNew" "&New Files"
menubar append %hPopMenu% 0x0000 "tmRead" "&Read Files"
menubar append %hPopMenu% 0x0000 "tmLoad" "&Load a File"
menubar append %hPopMenu% 0x0001 "tmDummy" "&Append to"
menubar append %hPopMenu% 0x0001 "tmDummy" "&Path Rename"
menubar append %hPopMenu% 0x0001 "tmDummy" "&Duplecate"
menubar append %hPopMenu% 0x0001 "tmDummy" "&Undo Edit"
menubar append %hPopMenu% 0x0001 "tmDummy" "&Insert File"
menubar append %hPopMenu% 0x0001 "tmDummy" "&X:close all"
menubar append %hPopMenu% 0x0000 "tmExec" "&Exec Dos"
menubar append %hPopMenu% 0x0000 "tmQuit" "&Quit"
menubar createpopup -&eax
let hPopMenu=%eax%
menubar append %hMenu% 0x0010 %hPopMenu% "&Mode"
menubar append %hPopMenu% 0x0000 "tmCtlColor" "&CR Display"
menubar append %hPopMenu% 0x0000 "tmCtlColor" "&TAB Display"
menubar append %hPopMenu% 0x0000 "tmCtlColor" "&EOF Display"
menubar append %hPopMenu% 0x0000 "tmLine" "&Line Numbers"
menubar append %hPopMenu% 0x0001 "tmDummy" "&Number Mode"
menubar append %hPopMenu% 0x0001 "tmDummy" "&System Info."
menubar append %hPopMenu% 0x0001 "tmDummy" "&Underline Csr"
menubar append %hPopMenu% 0x0000 "tmIndent" "&Auto Indent"
menubar append %hPopMenu% 0x0001 "tmDummy" "&Ignore Case"
menubar append %hPopMenu% 0x0001 "tmDummy" "&Wrod Search"
menubar append %hPopMenu% 0x0001 "tmDummy" "&Half Paging"
menubar append %hPopMenu% 0x0001 "tmDummy" "&Backup File"
menubar append %hPopMenu% 0x0000 "tmDisp" "&Right Margin"
menubar append %hPopMenu% 0x0001 "tmDummy" "&Page Length"
menubar createpopup -&eax
let hPopMenu=%eax%
menubar append %hMenu% 0x0010 %hPopMenu% "&Sub"
menubar append %hPopMenu% 0x0000 "tmJump" "&Jump to Line"
menubar append %hPopMenu% 0x0001 "tmDummy" "&Clear Stack"
menubar append %hPopMenu% 0x0001 "tmDummy" "&Block Top/End"
menubar append %hPopMenu% 0x0001 "tmDummy" "&Restore Line"
menubar append %hPopMenu% 0x0001 "tmDummy" "&Screen Lines"
menubar append %hPopMenu% 0x0000 "tmView" "&Read Only"
menubar append %hPopMenu% 0x0001 "tmDummy" "&Indent L/R"
menubar append %hPopMenu% 0x0000 "tmDisp" "change &Tab"
menubar append %hPopMenu% 0x0000 "tmExec" "&Peek Console"
menubar createpopup -&eax
let hPopMenu=%eax%
menubar append %hMenu% 0x0010 %hPopMenu% "&Macro"
menubar append %hPopMenu% 0x0000 "tmKeyMacS" "&Start"
menubar append %hPopMenu% 0x0000 "tmKeyMacE" "&End"
menubar append %hPopMenu% 0x0000 "tmKeyMacP" "&Play"
menubar append %hPopMenu% 0x0000 "tmKeyMacC" "&Clear"
menubar createpopup -&eax
let hPopMenu=%eax%
menubar append %hMenu% 0x0010 %hPopMenu% "&Help"
menubar append %hPopMenu% 0x0000 "tmContent" "&Content"
menubar append %hPopMenu% 0x0800 -1 0
menubar append %hPopMenu% 0x0000 "tmAbout" "&About..."
menubar append %hPopMenu% 0x0000 "tmRegist" "&Regist..."
menubar set %hwndMain% %hMenu%
menubar draw %hwndMain%
#--------------------------#
# ファンクションキーの登録 #
#--------------------------#
functionkey create -&eax
let hFKey=%eax%
functionkey append %hFKey% 0x00 0x70 "tmFile" "File"
functionkey append %hFKey% 0x00 0x71 "tmWndw" "Wndw"
functionkey append %hFKey% 0x00 0x72 "tmPick" "Pick"
functionkey append %hFKey% 0x00 0x73 "tmSplit" "Split"
functionkey append %hFKey% 0x00 0x74 "tmGetSt" "GetSt"
functionkey append %hFKey% 0x00 0x75 "tmFind" "Find"
functionkey append %hFKey% 0x00 0x76 "tmChng" "Chng"
functionkey append %hFKey% 0x00 0x77 "tmDel" "Del"
functionkey append %hFKey% 0x00 0x78 "tmPaste" "Ins"
functionkey append %hFKey% 0x00 0x79 "tmHelp" "Help"
#functionkey append %hFKey% 0x00 0x7A "tmDummy" "Pg"
functionkey append %hFKey% 0x00 0x7B "tmBlock" "Block"
functionkey append %hFKey% 0x04 0x70 "tmMode" "mode"
functionkey append %hFKey% 0x04 0x71 "tmSub" "sub"
#functionkey append %hFKey% 0x04 0x72 "tmDummy" "comp"
functionkey append %hFKey% 0x04 0x73 "tmBordr" "bordr"
functionkey append %hFKey% 0x04 0x74 "tmPaste" "putst"
functionkey append %hFKey% 0x04 0x75 "tmMulti" "multi"
functionkey append %hFKey% 0x04 0x76 "tmPaste" "puts2"
functionkey append %hFKey% 0x04 0x77 "tmCopy" "copy"
functionkey append %hFKey% 0x04 0x78 "tmPaste" "paste"
#functionkey append %hFKey% 0x04 0x79 "tmDummy" "tag"
#functionkey append %hFKey% 0x04 0x7A "tmDummy" "ext"
functionkey append %hFKey% 0x04 0x7B "tmMacro" "macro"
#----------------------------#
# アクセラレーターキーの登録 #
#----------------------------#
accelkey create -&eax
let hAccel=%eax%
let @ flags = 0x09 ; let @ key = Q:0
accelkey append %hAccel% %flags% "tmStroke" %key%
let @ flags = 0x09 ; let @ key = P:0
accelkey append %hAccel% %flags% "tmKeyMacP" %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 = A:0
accelkey append %hAccel% %flags% "tmWordLeft" %key%
let @ flags = 0x09 ; let @ key = F:0
accelkey append %hAccel% %flags% "tmWordRight" %key%
let @ flags = 0x09 ; let @ key = H:0
accelkey append %hAccel% %flags% "tmBack" %key%
let @ flags = 0x09 ; let @ key = G:0
accelkey append %hAccel% %flags% "tmDelete" %key%
let @ flags = 0x09 ; let @ key = U:0
accelkey append %hAccel% %flags% "tmUndo" %key%
let @ flags = 0x09 ; let @ key = R:0
accelkey append %hAccel% %flags% "tmPageUp" %key%
let @ flags = 0x09 ; let @ key = C:0
accelkey append %hAccel% %flags% "tmPageDown" %key%
let @ flags = 0x09 ; let @ key = B:0
accelkey append %hAccel% %flags% "tmBlock" %key%
let @ flags = 0x09 ; let @ key = Y:0
accelkey append %hAccel% %flags% "tmCut" %key%
let @ flags = 0x09 ; let @ key = J:0
accelkey append %hAccel% %flags% "tmPaste" %key%
let @ flags = 0x09 ; let @ key = L:0
accelkey append %hAccel% %flags% "tmGetSt" %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 = I:0
strokekey append %hStroke% %flags% "tmPaste" %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 = J:0
strokekey append %hStroke% %flags% "tmJump" %key%
let @ flags = 0x01 ; let @ key = F:0
strokekey append %hStroke% %flags% "tmFind" %key%
let @ flags = 0x01 ; let @ key = A:0
strokekey append %hStroke% %flags% "tmChng" %key%
strokekey set %hwndMain% %hStroke%
#------------#
# メッセージ #
#------------#
echo ^#**************************************************************^#
echo ^# ToolMan Editor Ver 1.80 Copyright (c) 1995-97 M.Maedera(JPN) ^#
echo ^# (VZ like mode) ^#
echo ^# If you have any question, please input "help[enter]." ^#
echo ^#**************************************************************^#
return
return
#======================================================================
#--------------#
# プロシジャー #
#--------------#
#----------------------------------------------------------------------
proc tmDummy
echo not implement
return
#----------------------------------------------------------------------
proc tmFile
menubar trackpopup 0
return
#----------------------------------------------------------------------
proc tmMode
menubar trackpopup 1
return
#----------------------------------------------------------------------
proc tmSub
menubar trackpopup 2
return
#----------------------------------------------------------------------
proc tmMacro
menubar trackpopup 3
return
#----------------------------------------------------------------------
proc tmHelp
menubar trackpopup 4
return
#----------------------------------------------------------------------
proc tmOpen
edit open
return
#----------------------------------------------------------------------
proc tmSaveAs
edit save
return
#----------------------------------------------------------------------
proc tmNew
edit new
return
#----------------------------------------------------------------------
proc tmRead
edit open ;edit mode view
return
#----------------------------------------------------------------------
proc tmLoad
edit open ;exit
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 tmView
if "%tm.edt.view%" == "1" then
set tm.edt.view=0
edit mode edit
else
set tm.edt.view=1
edit mode view
endif
return
#----------------------------------------------------------------------
proc tmKeyMacS
edit record start
return
#----------------------------------------------------------------------
proc tmKeyMacE
edit record end
return
#----------------------------------------------------------------------
proc tmKeyMacP
edit record play
return
#----------------------------------------------------------------------
proc tmKeyMacC
edit record clear
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 tmPick
console size +16
return
#----------------------------------------------------------------------
proc tmSplit
console size -16
return
#----------------------------------------------------------------------
proc tmGetSt
edit -f select start
edit -f cursor down
edit -f select end
edit -f select copy
return
#----------------------------------------------------------------------
proc tmFind
edit -f find
return
#----------------------------------------------------------------------
proc tmChng
edit -f replace
return
#----------------------------------------------------------------------
proc tmDel
edit -f select cut ;edit -f select end
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 tmBordr
console size 0
return
#----------------------------------------------------------------------
proc tmMulti
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
#----------------------------------------------------------------------