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 >
Text File  |  1997-08-25  |  7KB  |  249 lines

  1. @echo off
  2.  
  3. #----------------------------------#
  4. # メインウィンンドのハンドルを取得 #
  5. #----------------------------------#
  6.  
  7. window get main -&eax
  8. let hwndMain=%eax%
  9.  
  10. #----------------------#
  11. # 以前のリソースを削除 #
  12. #----------------------#
  13.  
  14. menubar get %hwndMain% -&eax
  15. let hMenu=%eax%
  16.  
  17. menubar set %hwndMain% 0
  18. menubar destory %hMenu%
  19. menubar draw %hwndMain%
  20.  
  21. menubar getpopup %hwndMain% -&eax
  22. let hPopMenu=%eax%
  23. menubar destory %hPopMenu%
  24.  
  25. toolbar get %hwndMain% -&eax
  26. let hTBar=%eax%
  27. toolbar destory %hTBar%
  28.  
  29. functionkey get %hwndMain% -&eax
  30. let hFKey=%eax%
  31. functionkey destroy %hFKey%
  32.  
  33. accelkey get %hwndMain% -&eax
  34. let hAccel=%eax%
  35. accelkey destroy %hAccel%
  36.  
  37. strokekey get %hwndMain% -&eax
  38. let hStroke=%eax%
  39. strokekey destroy %hStroke%
  40.  
  41. #------------------#
  42. # 表示属性を決める #
  43. #------------------#
  44. console size 0
  45. window sdi
  46. toolbar     hide
  47. functionkey hide
  48. console scrollbar horz show
  49. console scrollbar vert show
  50. edit    scrollbar horz show
  51. edit    scrollbar vert show
  52. edit    mode noline
  53. edit    mode noruler
  54. window get edit -&eax
  55. window set focus %eax%
  56. mode edit font "-f:FixedSys"
  57. mode edit color -fg: -bg: -ctl:
  58.  
  59. #--------------------#
  60. # メニューバーの登録 #
  61. #--------------------#
  62.  
  63. menubar create -&eax
  64. let hMenu=%eax%
  65.  
  66. menubar createpopup -&eax
  67. let hPopMenu=%eax%
  68.  
  69. menubar append %hMenu%    0x0010 %hPopMenu% "ファイル(&F)"
  70. menubar append %hPopMenu%      0 "tmNew"    "新規作成(&N)"
  71. menubar append %hPopMenu%      0 "tmOpen"   "開く(&O)..."
  72. menubar append %hPopMenu%      0 "tmSave"   "上書き保存(&S)"
  73. menubar append %hPopMenu%      0 "tmSaveAs" "名前を付けて保存(&A)..."
  74. menubar append %hPopMenu% 0x0800 -1         0
  75. menubar append %hPopMenu%      1 "tmPage"   "ページ設定(&T)..."
  76. menubar append %hPopMenu%      0 "tmPrint" "印刷(&P)"
  77. menubar append %hPopMenu% 0x0800 -1         0
  78. menubar append %hPopMenu%      0 "tmExit"   "終了(&X)"
  79.  
  80. menubar createpopup -&eax
  81. let hPopMenu=%eax%
  82.  
  83. menubar append %hMenu%    0x0010 %hPopMenu%   "編集(&E)"
  84.  
  85. menubar append %hPopMenu%      0 "tmUndo"     "元に戻す(&U)    Ctrl+Z"
  86.  
  87. menubar append %hPopMenu% 0x0800 -1         0
  88. menubar append %hPopMenu%      0 "tmCut"      "切り取り(&T)    Ctrl+X"
  89. menubar append %hPopMenu%      0 "tmCopy"     "コピー(&C)    Ctrl+C"
  90. menubar append %hPopMenu%      0 "tmPaste"    "貼り付け(&P)    Ctrl+V"
  91. menubar append %hPopMenu%      0 "tmDelete"   "削除(&L)    Del"
  92.  
  93. menubar append %hPopMenu% 0x0800 -1         0
  94. menubar append %hPopMenu%      0 "tmSelect"  "すべて選択(&A)"
  95. menubar append %hPopMenu%      0 "tmDate"    "日付けと時刻(&D)"
  96.  
  97. menubar append %hPopMenu% 0x0800 -1          0
  98. menubar append %hPopMenu%      0 "tmWrap"    "右端で折り返す(&W)"
  99.  
  100. menubar createpopup -&eax
  101. let hPopMenu=%eax%
  102.  
  103. menubar append %hMenu%    0x0010 %hPopMenu%   "検索(&S)"
  104. menubar append %hPopMenu%      0 "tmFind"    "文字列の検索(&F)..."
  105. menubar append %hPopMenu%      0 "tmNext"    "次を検索(&N)    F3"
  106.  
  107. menubar createpopup -&eax
  108. let hPopMenu=%eax%
  109.  
  110. menubar append %hMenu%    0x0010 %hPopMenu%   "ヘルプ(&H)"
  111. menubar append %hPopMenu%      0 "tmHelp"     "トピックの検索(&H)"
  112. menubar append %hPopMenu%      0 "tmAbout"    "バージョン情報(&A)..."
  113. menubar append %hPopMenu%      0 "tmRegist"   "ユーザー登録(&R)..."
  114.  
  115. menubar set %hwndMain% %hMenu%
  116. menubar draw %hwndMain%
  117.  
  118. #----------------------------#
  119. # アクセラレーターキーの登録 #
  120. #----------------------------#
  121. accelkey create -&eax
  122. let hAccel=%eax%
  123.  
  124. let @ flags = 0x09 ; let @ key = H:0
  125. accelkey append %hAccel% %flags% "tmBack" %key%
  126.  
  127. let @ flags = 0x09 ; let @ key = Z:0
  128. accelkey append %hAccel% %flags% "tmUndo" %key%
  129.  
  130. let @ flags = 0x09 ; let @ key = X:0
  131. accelkey append %hAccel% %flags% "tmCut" %key%
  132.  
  133. let @ flags = 0x09 ; let @ key = C:0
  134. accelkey append %hAccel% %flags% "tmCopy" %key%
  135.  
  136. let @ flags = 0x09 ; let @ key = V:0
  137. accelkey append %hAccel% %flags% "tmPaste" %key%
  138.  
  139. let @ flags = 0x01 ; let @ key = 0x72 # VK_F3
  140. accelkey append %hAccel% %flags% "tmNext" %key%
  141.  
  142. accelkey set %hwndMain% %hAccel%
  143.  
  144. #------------#
  145. # メッセージ #
  146. #------------#
  147. echo ^#**************************************************************^#
  148. echo ^# ToolMan Editor Ver 1.80 Copyright (c) 1995-97 M.Maedera(JPN) ^#
  149. echo ^# (Notepad like Script)                                        ^#
  150. echo ^# If you have any question, please input "help[enter]."        ^#
  151. echo ^#**************************************************************^#
  152. return
  153. #======================================================================
  154. #--------------#
  155. # プロシジャー #
  156. #--------------#
  157. #----------------------------------------------------------------------
  158. proc tmNew
  159. edit new
  160. return
  161. #----------------------------------------------------------------------
  162. proc tmOpen
  163. edit open
  164. return
  165. #----------------------------------------------------------------------
  166. proc tmSave
  167. edit save
  168. return
  169. #----------------------------------------------------------------------
  170. proc tmSaveAs
  171. edit saveas
  172. return
  173. #----------------------------------------------------------------------
  174. proc tmPage
  175. echo not implement
  176. return
  177. #----------------------------------------------------------------------
  178. proc tmPrint
  179. echo not implement
  180. return
  181. #----------------------------------------------------------------------
  182. proc tmExit
  183. exit
  184. return
  185. #----------------------------------------------------------------------
  186. proc tmUndo
  187. edit -f undo
  188. return
  189. #----------------------------------------------------------------------
  190. proc tmCut
  191. edit -f select cut
  192. return
  193. #----------------------------------------------------------------------
  194. proc tmCopy
  195. edit -f select copy
  196. return
  197. #----------------------------------------------------------------------
  198. proc tmPaste
  199. edit -f select paste
  200. return
  201. #----------------------------------------------------------------------
  202. proc tmDelete
  203. edit -f select delete
  204. return
  205. #----------------------------------------------------------------------
  206. proc tmSelect
  207. edit -f cursor get max -&eax -&ebx
  208. edit -f cursor set eax ebx
  209. edit -f select start
  210. edit -f cursor set 1 1
  211. edit -f select end
  212. return
  213. #----------------------------------------------------------------------
  214. proc tmDate
  215. echo | date | edit in
  216. echo |        edit in
  217. echo | time | edit in
  218. echo |        edit in
  219. return
  220. #----------------------------------------------------------------------
  221. proc tmWrap
  222. mode edit disp
  223. return
  224. #----------------------------------------------------------------------
  225. proc tmFind
  226. edit -f find
  227. return
  228. #----------------------------------------------------------------------
  229. proc tmNext
  230. edit -f find right
  231. return
  232. #----------------------------------------------------------------------
  233. proc tmHelp
  234. window help
  235. return
  236. #----------------------------------------------------------------------
  237. proc tmAbout
  238. window about
  239. return
  240. #----------------------------------------------------------------------
  241. proc tmRegist
  242. window regist
  243. return
  244. #----------------------------------------------------------------------
  245. proc tmPrint
  246. edit print
  247. return
  248. #----------------------------------------------------------------------
  249.