冰楓論壇

標題: TwMS v215.2 CRC 按鍵CALL的應用 [打印本頁]

作者: 乂Boyue乂    時間: 2019-4-11 21:26
標題: TwMS v215.2 CRC 按鍵CALL的應用
  1. //TwMS v215.2 CRC 按鍵CALL的應用
  2. //使用方法: 寫個數據把對應開關打開即可按一下 開關寫法如下
  3. [ENABLE]
  4. Alloc(AutoKey,1024)
  5. Registersymbol(Key1_SW)
  6. Alloc(Key1_SW,4)
  7. Registersymbol(Key2_SW)
  8. Alloc(Key2_SW,4)
  9. Registersymbol(Key3_SW)
  10. Alloc(Key3_SW,4)
  11. Registersymbol(Key4_SW)
  12. Alloc(Key4_SW,4)
  13. Registersymbol(Key5_SW)
  14. Alloc(Key5_SW,4)
  15. Registersymbol(Key6_SW)
  16. Alloc(Key6_SW,4)
  17. Registersymbol(Key7_SW)
  18. Alloc(Key7_SW,4)
  19. Registersymbol(Key8_SW)
  20. Alloc(Key8_SW,4)
  21. Registersymbol(Key9_SW)
  22. Alloc(Key9_SW,4)
  23. Registersymbol(Key0_SW)
  24. Alloc(Key0_SW,4)
  25. Label(PressKey_1)
  26. Label(PressKey_2)
  27. Label(PressKey_3)
  28. Label(PressKey_4)
  29. Label(PressKey_5)
  30. Label(PressKey_6)
  31. Label(PressKey_7)
  32. Label(PressKey_8)
  33. Label(PressKey_9)
  34. Label(PressKey_0)
  35. //========================================
  36. Key1_SW:
  37. DD 00
  38. Key2_SW:
  39. DD 00
  40. Key3_SW:
  41. DD 00
  42. Key4_SW:
  43. DD 00
  44. Key5_SW:
  45. DD 00
  46. Key6_SW:
  47. DD 00
  48. Key7_SW:
  49. DD 00
  50. Key8_SW:
  51. DD 00
  52. Key9_SW:
  53. DD 00
  54. Key0_SW:
  55. DD 00
  56. //========================================
  57. PressKey_1:
  58. pushad
  59. mov [Key1_SW],0
  60. mov esi,[0393E634]
  61. mov ecx,[esi+A4]
  62. push 00020000 //Key Code
  63. push 00
  64. call 025C5D40
  65. popad
  66. jmp 0226A38C+8

  67. PressKey_2:
  68. pushad
  69. mov [Key2_SW],0
  70. mov esi,[0393E634]
  71. mov ecx,[esi+A4]
  72. push 00030000 //Key Code
  73. push 00
  74. call 025C5D40
  75. popad
  76. jmp 0226A38C+8

  77. PressKey_3:
  78. pushad
  79. mov [Key3_SW],0
  80. mov esi,[0393E634]
  81. mov ecx,[esi+A4]
  82. push 00040000 //Key Code
  83. push 00
  84. call 025C5D40
  85. popad
  86. jmp 0226A38C+8

  87. PressKey_4:
  88. pushad
  89. mov [Key4_SW],0
  90. mov esi,[0393E634]
  91. mov ecx,[esi+A4]
  92. push 00050000 //Key Code
  93. push 00
  94. call 025C5D40
  95. popad
  96. jmp 0226A38C+8

  97. PressKey_5:
  98. pushad
  99. mov [Key5_SW],0
  100. mov esi,[0393E634]
  101. mov ecx,[esi+A4]
  102. push 00060000 //Key Code
  103. push 00
  104. call 025C5D40
  105. popad
  106. jmp 0226A38C+8

  107. PressKey_6:
  108. pushad
  109. mov [Key6_SW],0
  110. mov esi,[0393E634]
  111. mov ecx,[esi+A4]
  112. push 00070000 //Key Code
  113. push 00
  114. call 025C5D40
  115. popad
  116. jmp 0226A38C+8

  117. PressKey_7:
  118. pushad
  119. mov [Key7_SW],0
  120. mov esi,[0393E634]
  121. mov ecx,[esi+A4]
  122. push 00080000 //Key Code
  123. push 00
  124. call 025C5D40
  125. popad
  126. jmp 0226A38C+8

  127. PressKey_8:
  128. pushad
  129. mov [Key8_SW],0
  130. mov esi,[0393E634]
  131. mov ecx,[esi+A4]
  132. push 00090000 //Key Code
  133. push 00
  134. call 025C5D40
  135. popad
  136. jmp 0226A38C+8

  137. PressKey_9:
  138. pushad
  139. mov [Key9_SW],0
  140. mov esi,[0393E634]
  141. mov ecx,[esi+A4]
  142. push 000A0000 //Key Code
  143. push 00
  144. call 025C5D40
  145. popad
  146. jmp 0226A38C+8

  147. PressKey_0:
  148. pushad
  149. mov [Key0_SW],0
  150. mov esi,[0393E634]
  151. mov ecx,[esi+A4]
  152. push 000B0000 //Key Code
  153. push 00
  154. call 025C5D40
  155. popad
  156. jmp 0226A38C+8
  157. //========================================
  158. AutoKey:
  159. DB 55 8b 6b 04 89 6c 24 04 //Original Code
  160. cmp [Key1_SW],1
  161. je PressKey_1
  162. cmp [Key2_SW],1
  163. je PressKey_2
  164. cmp [Key3_SW],1
  165. je PressKey_3
  166. cmp [Key4_SW],1
  167. je PressKey_4
  168. cmp [Key5_SW],1
  169. je PressKey_5
  170. cmp [Key6_SW],1
  171. je PressKey_6
  172. cmp [Key7_SW],1
  173. je PressKey_7
  174. cmp [Key8_SW],1
  175. je PressKey_8
  176. cmp [Key9_SW],1
  177. je PressKey_9
  178. cmp [Key0_SW],1
  179. je PressKey_0
  180. jmp 0226A38C+8

  181. 0226A38C:
  182. jmp AutoKey
  183. [DISABLE]
  184. 0226A38C:
  185. DB 55 8b 6b 04 89 6c 24 04

  186. DeAlloc(AutoKey)
  187. UnRegistersymbol(Key1_SW)
  188. DeAlloc(Key1_SW)
  189. UnRegistersymbol(Key2_SW)
  190. DeAlloc(Key2_SW)
  191. UnRegistersymbol(Key3_SW)
  192. DeAlloc(Key3_SW)
  193. UnRegistersymbol(Key4_SW)
  194. DeAlloc(Key4_SW)
  195. UnRegistersymbol(Key5_SW)
  196. DeAlloc(Key5_SW)
  197. UnRegistersymbol(Key6_SW)
  198. DeAlloc(Key6_SW)
  199. UnRegistersymbol(Key7_SW)
  200. DeAlloc(Key7_SW)
  201. UnRegistersymbol(Key8_SW)
  202. DeAlloc(Key8_SW)
  203. UnRegistersymbol(Key9_SW)
  204. DeAlloc(Key9_SW)
  205. UnRegistersymbol(Key0_SW)
  206. DeAlloc(Key0_SW)
複製代碼
  1. [ENABLE]
  2. Key1_SW:
  3. DD 01
  4. [DISABLE]
複製代碼

作者: rhg59321    時間: 2019-4-11 22:30
大大回來玩了嗎?




歡迎光臨 冰楓論壇 (https://bingfong.com/) Powered by 冰楓