Advertisement
Guest User

Untitled

a guest
Jul 24th, 2011
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 33.85 KB | None | 0 0
  1. #RequireAdmin
  2. #Region _Memory
  3. Func _MEMORYOPEN($IV_PID, $IV_DESIREDACCESS = 2035711, $IV_INHERITHANDLE = 1)
  4.     If Not ProcessExists($IV_PID) Then
  5.         SetError(1)
  6.         Return 0
  7.     EndIf
  8.     Local $AH_HANDLE[2] = [DllOpen("kernel32.dll")]
  9.     If @error Then
  10.         SetError(2)
  11.         Return 0
  12.     EndIf
  13.     Local $AV_OPENPROCESS = DllCall($AH_HANDLE[0], "int", "OpenProcess", "int", $IV_DESIREDACCESS, "int", $IV_INHERITHANDLE, "int", $IV_PID)
  14.     If @error Then
  15.         DllClose($AH_HANDLE[0])
  16.         SetError(3)
  17.         Return 0
  18.     EndIf
  19.     $AH_HANDLE[1] = $AV_OPENPROCESS[0]
  20.     Return $AH_HANDLE
  21. EndFunc
  22. Func _MEMORYREAD($IV_ADDRESS, $AH_HANDLE, $SV_TYPE = "dword")
  23.     If Not IsArray($AH_HANDLE) Then
  24.         SetError(1)
  25.         Return 0
  26.     EndIf
  27.     Local $V_BUFFER = DllStructCreate($SV_TYPE)
  28.     If @error Then
  29.         SetError(@error + 1)
  30.         Return 0
  31.     EndIf
  32.     DllCall($AH_HANDLE[0], "int", "ReadProcessMemory", "int", $AH_HANDLE[1], "int", $IV_ADDRESS, "ptr", DllStructGetPtr($V_BUFFER), "int", DllStructGetSize($V_BUFFER), "int", "")
  33.     If Not @error Then
  34.         Local $V_VALUE = DllStructGetData($V_BUFFER, 1)
  35.         Return $V_VALUE
  36.     Else
  37.         SetError(6)
  38.         Return 0
  39.     EndIf
  40. EndFunc
  41. Func _MEMORYWRITE($IV_ADDRESS, $AH_HANDLE, $V_DATA, $SV_TYPE = "dword")
  42.     If Not IsArray($AH_HANDLE) Then
  43.         SetError(1)
  44.         Return 0
  45.     EndIf
  46.     Local $V_BUFFER = DllStructCreate($SV_TYPE)
  47.     If @error Then
  48.         SetError(@error + 1)
  49.         Return 0
  50.     Else
  51.         DllStructSetData($V_BUFFER, 1, $V_DATA)
  52.         If @error Then
  53.             SetError(6)
  54.             Return 0
  55.         EndIf
  56.     EndIf
  57.     DllCall($AH_HANDLE[0], "int", "WriteProcessMemory", "int", $AH_HANDLE[1], "int", $IV_ADDRESS, "ptr", DllStructGetPtr($V_BUFFER), "int", DllStructGetSize($V_BUFFER), "int", "")
  58.     If Not @error Then
  59.         Return 1
  60.     Else
  61.         SetError(7)
  62.         Return 0
  63.     EndIf
  64. EndFunc
  65. Func _MEMORYCLOSE($AH_HANDLE)
  66.     If Not IsArray($AH_HANDLE) Then
  67.         SetError(1)
  68.         Return 0
  69.     EndIf
  70.     DllCall($AH_HANDLE[0], "int", "CloseHandle", "int", $AH_HANDLE[1])
  71.     If Not @error Then
  72.         DllClose($AH_HANDLE[0])
  73.         Return 1
  74.     Else
  75.         DllClose($AH_HANDLE[0])
  76.         SetError(2)
  77.         Return 0
  78.     EndIf
  79. EndFunc
  80. Func SETPRIVILEGE($PRIVILEGE, $BENABLE)
  81.     Const $TOKEN_ADJUST_PRIVILEGES = 32
  82.     Const $TOKEN_QUERY = 8
  83.     Const $SE_PRIVILEGE_ENABLED = 2
  84.     Local $HTOKEN, $SP_AUXRET, $SP_RET, $HCURRPROCESS, $NTOKENS, $NTOKENINDEX, $PRIV
  85.     $NTOKENS = 1
  86.     $LUID = DllStructCreate("dword;int")
  87.     If IsArray($PRIVILEGE) Then $NTOKENS = UBound($PRIVILEGE)
  88.     $TOKEN_PRIVILEGES = DllStructCreate("dword;dword[" & (3 * $NTOKENS) & "]")
  89.     $NEWTOKEN_PRIVILEGES = DllStructCreate("dword;dword[" & (3 * $NTOKENS) & "]")
  90.     $HCURRPROCESS = DllCall("kernel32.dll", "hwnd", "GetCurrentProcess")
  91.     $SP_AUXRET = DllCall("advapi32.dll", "int", "OpenProcessToken", "hwnd", $HCURRPROCESS[0], "int", BitOR($TOKEN_ADJUST_PRIVILEGES, $TOKEN_QUERY), "int_ptr", 0)
  92.     If $SP_AUXRET[0] Then
  93.         $HTOKEN = $SP_AUXRET[3]
  94.         DllStructSetData($TOKEN_PRIVILEGES, 1, 1)
  95.         $NTOKENINDEX = 1
  96.         While $NTOKENINDEX <= $NTOKENS
  97.             If IsArray($PRIVILEGE) Then
  98.                 $PRIV = $PRIVILEGE[$NTOKENINDEX - 1]
  99.             Else
  100.                 $PRIV = $PRIVILEGE
  101.             EndIf
  102.             $RET = DllCall("advapi32.dll", "int", "LookupPrivilegeValue", "str", "", "str", $PRIV, "ptr", DllStructGetPtr($LUID))
  103.             If $RET[0] Then
  104.                 If $BENABLE Then
  105.                     DllStructSetData($TOKEN_PRIVILEGES, 2, $SE_PRIVILEGE_ENABLED, (3 * $NTOKENINDEX))
  106.                 Else
  107.                     DllStructSetData($TOKEN_PRIVILEGES, 2, 0, (3 * $NTOKENINDEX))
  108.                 EndIf
  109.                 DllStructSetData($TOKEN_PRIVILEGES, 2, DllStructGetData($LUID, 1), (3 * ($NTOKENINDEX - 1)) + 1)
  110.                 DllStructSetData($TOKEN_PRIVILEGES, 2, DllStructGetData($LUID, 2), (3 * ($NTOKENINDEX - 1)) + 2)
  111.                 DllStructSetData($LUID, 1, 0)
  112.                 DllStructSetData($LUID, 2, 0)
  113.             EndIf
  114.             $NTOKENINDEX += 1
  115.         WEnd
  116.         $RET = DllCall("advapi32.dll", "int", "AdjustTokenPrivileges", "hwnd", $HTOKEN, "int", 0, "ptr", DllStructGetPtr($TOKEN_PRIVILEGES), "int", DllStructGetSize($NEWTOKEN_PRIVILEGES), "ptr", DllStructGetPtr($NEWTOKEN_PRIVILEGES), "int_ptr", 0)
  117.         $F = DllCall("kernel32.dll", "int", "GetLastError")
  118.     EndIf
  119.     $NEWTOKEN_PRIVILEGES = 0
  120.     $TOKEN_PRIVILEGES = 0
  121.     $LUID = 0
  122.     If $SP_AUXRET[0] = 0 Then Return 0
  123.     $SP_AUXRET = DllCall("kernel32.dll", "int", "CloseHandle", "hwnd", $HTOKEN)
  124.     If Not $RET[0] And Not $SP_AUXRET[0] Then Return 0
  125.     Return $RET[0]
  126. EndFunc
  127. #EndRegion _Memory
  128. Global Const $BS_GROUPBOX = 7
  129. Global Const $BS_BOTTOM = 2048
  130. Global Const $BS_CENTER = 768
  131. Global Const $BS_DEFPUSHBUTTON = 1
  132. Global Const $BS_LEFT = 256
  133. Global Const $BS_MULTILINE = 8192
  134. Global Const $BS_PUSHBOX = 10
  135. Global Const $BS_PUSHLIKE = 4096
  136. Global Const $BS_RIGHT = 512
  137. Global Const $BS_RIGHTBUTTON = 32
  138. Global Const $BS_TOP = 1024
  139. Global Const $BS_VCENTER = 3072
  140. Global Const $BS_FLAT = 32768
  141. Global Const $BS_ICON = 64
  142. Global Const $BS_BITMAP = 128
  143. Global Const $BS_NOTIFY = 16384
  144. Global Const $BS_SPLITBUTTON = 12
  145. Global Const $BS_DEFSPLITBUTTON = 13
  146. Global Const $BS_COMMANDLINK = 14
  147. Global Const $BS_DEFCOMMANDLINK = 15
  148. Global Const $BCSIF_GLYPH = 1
  149. Global Const $BCSIF_IMAGE = 2
  150. Global Const $BCSIF_STYLE = 4
  151. Global Const $BCSIF_SIZE = 8
  152. Global Const $BCSS_NOSPLIT = 1
  153. Global Const $BCSS_STRETCH = 2
  154. Global Const $BCSS_ALIGNLEFT = 4
  155. Global Const $BCSS_IMAGE = 8
  156. Global Const $BUTTON_IMAGELIST_ALIGN_LEFT = 0
  157. Global Const $BUTTON_IMAGELIST_ALIGN_RIGHT = 1
  158. Global Const $BUTTON_IMAGELIST_ALIGN_TOP = 2
  159. Global Const $BUTTON_IMAGELIST_ALIGN_BOTTOM = 3
  160. Global Const $BUTTON_IMAGELIST_ALIGN_CENTER = 4
  161. Global Const $BS_3STATE = 5
  162. Global Const $BS_AUTO3STATE = 6
  163. Global Const $BS_AUTOCHECKBOX = 3
  164. Global Const $BS_CHECKBOX = 2
  165. Global Const $BS_RADIOBUTTON = 4
  166. Global Const $BS_AUTORADIOBUTTON = 9
  167. Global Const $BS_OWNERDRAW = 11
  168. Global Const $GUI_SS_DEFAULT_BUTTON = 0
  169. Global Const $GUI_SS_DEFAULT_CHECKBOX = 0
  170. Global Const $GUI_SS_DEFAULT_GROUP = 0
  171. Global Const $GUI_SS_DEFAULT_RADIO = 0
  172. Global Const $BCM_FIRST = 5632
  173. Global Const $BCM_GETIDEALSIZE = ($BCM_FIRST + 1)
  174. Global Const $BCM_GETIMAGELIST = ($BCM_FIRST + 3)
  175. Global Const $BCM_GETNOTE = ($BCM_FIRST + 10)
  176. Global Const $BCM_GETNOTELENGTH = ($BCM_FIRST + 11)
  177. Global Const $BCM_GETSPLITINFO = ($BCM_FIRST + 8)
  178. Global Const $BCM_GETTEXTMARGIN = ($BCM_FIRST + 5)
  179. Global Const $BCM_SETDROPDOWNSTATE = ($BCM_FIRST + 6)
  180. Global Const $BCM_SETIMAGELIST = ($BCM_FIRST + 2)
  181. Global Const $BCM_SETNOTE = ($BCM_FIRST + 9)
  182. Global Const $BCM_SETSHIELD = ($BCM_FIRST + 12)
  183. Global Const $BCM_SETSPLITINFO = ($BCM_FIRST + 7)
  184. Global Const $BCM_SETTEXTMARGIN = ($BCM_FIRST + 4)
  185. Global Const $BM_CLICK = 245
  186. Global Const $BM_GETCHECK = 240
  187. Global Const $BM_GETIMAGE = 246
  188. Global Const $BM_GETSTATE = 242
  189. Global Const $BM_SETCHECK = 241
  190. Global Const $BM_SETDONTCLICK = 248
  191. Global Const $BM_SETIMAGE = 247
  192. Global Const $BM_SETSTATE = 243
  193. Global Const $BM_SETSTYLE = 244
  194. Global Const $BCN_FIRST = -1250
  195. Global Const $BCN_DROPDOWN = ($BCN_FIRST + 2)
  196. Global Const $BCN_HOTITEMCHANGE = ($BCN_FIRST + 1)
  197. Global Const $BN_CLICKED = 0
  198. Global Const $BN_PAINT = 1
  199. Global Const $BN_HILITE = 2
  200. Global Const $BN_UNHILITE = 3
  201. Global Const $BN_DISABLE = 4
  202. Global Const $BN_DOUBLECLICKED = 5
  203. Global Const $BN_SETFOCUS = 6
  204. Global Const $BN_KILLFOCUS = 7
  205. Global Const $BN_PUSHED = $BN_HILITE
  206. Global Const $BN_UNPUSHED = $BN_UNHILITE
  207. Global Const $BN_DBLCLK = $BN_DOUBLECLICKED
  208. Global Const $BST_CHECKED = 1
  209. Global Const $BST_INDETERMINATE = 2
  210. Global Const $BST_UNCHECKED = 0
  211. Global Const $BST_FOCUS = 8
  212. Global Const $BST_PUSHED = 4
  213. Global Const $BST_DONTCLICK = 128
  214. Global Const $GUI_EVENT_CLOSE = -3
  215. Global Const $GUI_EVENT_MINIMIZE = -4
  216. Global Const $GUI_EVENT_RESTORE = -5
  217. Global Const $GUI_EVENT_MAXIMIZE = -6
  218. Global Const $GUI_EVENT_PRIMARYDOWN = -7
  219. Global Const $GUI_EVENT_PRIMARYUP = -8
  220. Global Const $GUI_EVENT_SECONDARYDOWN = -9
  221. Global Const $GUI_EVENT_SECONDARYUP = -10
  222. Global Const $GUI_EVENT_MOUSEMOVE = -11
  223. Global Const $GUI_EVENT_RESIZED = -12
  224. Global Const $GUI_EVENT_DROPPED = -13
  225. Global Const $GUI_RUNDEFMSG = "GUI_RUNDEFMSG"
  226. Global Const $GUI_AVISTOP = 0
  227. Global Const $GUI_AVISTART = 1
  228. Global Const $GUI_AVICLOSE = 2
  229. Global Const $GUI_CHECKED = 1
  230. Global Const $GUI_INDETERMINATE = 2
  231. Global Const $GUI_UNCHECKED = 4
  232. Global Const $GUI_DROPACCEPTED = 8
  233. Global Const $GUI_NODROPACCEPTED = 4096
  234. Global Const $GUI_ACCEPTFILES = $GUI_DROPACCEPTED
  235. Global Const $GUI_SHOW = 16
  236. Global Const $GUI_HIDE = 32
  237. Global Const $GUI_ENABLE = 64
  238. Global Const $GUI_DISABLE = 128
  239. Global Const $GUI_FOCUS = 256
  240. Global Const $GUI_NOFOCUS = 8192
  241. Global Const $GUI_DEFBUTTON = 512
  242. Global Const $GUI_EXPAND = 1024
  243. Global Const $GUI_ONTOP = 2048
  244. Global Const $GUI_FONTITALIC = 2
  245. Global Const $GUI_FONTUNDER = 4
  246. Global Const $GUI_FONTSTRIKE = 8
  247. Global Const $GUI_DOCKAUTO = 1
  248. Global Const $GUI_DOCKLEFT = 2
  249. Global Const $GUI_DOCKRIGHT = 4
  250. Global Const $GUI_DOCKHCENTER = 8
  251. Global Const $GUI_DOCKTOP = 32
  252. Global Const $GUI_DOCKBOTTOM = 64
  253. Global Const $GUI_DOCKVCENTER = 128
  254. Global Const $GUI_DOCKWIDTH = 256
  255. Global Const $GUI_DOCKHEIGHT = 512
  256. Global Const $GUI_DOCKSIZE = 768
  257. Global Const $GUI_DOCKMENUBAR = 544
  258. Global Const $GUI_DOCKSTATEBAR = 576
  259. Global Const $GUI_DOCKALL = 802
  260. Global Const $GUI_DOCKBORDERS = 102
  261. Global Const $GUI_GR_CLOSE = 1
  262. Global Const $GUI_GR_LINE = 2
  263. Global Const $GUI_GR_BEZIER = 4
  264. Global Const $GUI_GR_MOVE = 6
  265. Global Const $GUI_GR_COLOR = 8
  266. Global Const $GUI_GR_RECT = 10
  267. Global Const $GUI_GR_ELLIPSE = 12
  268. Global Const $GUI_GR_PIE = 14
  269. Global Const $GUI_GR_DOT = 16
  270. Global Const $GUI_GR_PIXEL = 18
  271. Global Const $GUI_GR_HINT = 20
  272. Global Const $GUI_GR_REFRESH = 22
  273. Global Const $GUI_GR_PENSIZE = 24
  274. Global Const $GUI_GR_NOBKCOLOR = -2
  275. Global Const $GUI_BKCOLOR_DEFAULT = -1
  276. Global Const $GUI_BKCOLOR_TRANSPARENT = -2
  277. Global Const $GUI_BKCOLOR_LV_ALTERNATE = -33554432
  278. Global Const $GUI_WS_EX_PARENTDRAG = 1048576
  279. Global Const $SS_LEFT = 0
  280. Global Const $SS_CENTER = 1
  281. Global Const $SS_RIGHT = 2
  282. Global Const $SS_ICON = 3
  283. Global Const $SS_BLACKRECT = 4
  284. Global Const $SS_GRAYRECT = 5
  285. Global Const $SS_WHITERECT = 6
  286. Global Const $SS_BLACKFRAME = 7
  287. Global Const $SS_GRAYFRAME = 8
  288. Global Const $SS_WHITEFRAME = 9
  289. Global Const $SS_SIMPLE = 11
  290. Global Const $SS_LEFTNOWORDWRAP = 12
  291. Global Const $SS_BITMAP = 14
  292. Global Const $SS_ETCHEDHORZ = 16
  293. Global Const $SS_ETCHEDVERT = 17
  294. Global Const $SS_ETCHEDFRAME = 18
  295. Global Const $SS_NOPREFIX = 128
  296. Global Const $SS_NOTIFY = 256
  297. Global Const $SS_CENTERIMAGE = 512
  298. Global Const $SS_RIGHTJUST = 1024
  299. Global Const $SS_SUNKEN = 4096
  300. Global Const $GUI_SS_DEFAULT_LABEL = 0
  301. Global Const $GUI_SS_DEFAULT_GRAPHIC = 0
  302. Global Const $GUI_SS_DEFAULT_ICON = $SS_NOTIFY
  303. Global Const $GUI_SS_DEFAULT_PIC = $SS_NOTIFY
  304. Global Const $WS_TILED = 0
  305. Global Const $WS_OVERLAPPED = 0
  306. Global Const $WS_MAXIMIZEBOX = 65536
  307. Global Const $WS_MINIMIZEBOX = 131072
  308. Global Const $WS_TABSTOP = 65536
  309. Global Const $WS_GROUP = 131072
  310. Global Const $WS_SIZEBOX = 262144
  311. Global Const $WS_THICKFRAME = 262144
  312. Global Const $WS_SYSMENU = 524288
  313. Global Const $WS_HSCROLL = 1048576
  314. Global Const $WS_VSCROLL = 2097152
  315. Global Const $WS_DLGFRAME = 4194304
  316. Global Const $WS_BORDER = 8388608
  317. Global Const $WS_CAPTION = 12582912
  318. Global Const $WS_OVERLAPPEDWINDOW = 13565952
  319. Global Const $WS_TILEDWINDOW = 13565952
  320. Global Const $WS_MAXIMIZE = 16777216
  321. Global Const $WS_CLIPCHILDREN = 33554432
  322. Global Const $WS_CLIPSIBLINGS = 67108864
  323. Global Const $WS_DISABLED = 134217728
  324. Global Const $WS_VISIBLE = 268435456
  325. Global Const $WS_MINIMIZE = 536870912
  326. Global Const $WS_CHILD = 1073741824
  327. Global Const $WS_POPUP = -2147483648
  328. Global Const $WS_POPUPWINDOW = -2138570752
  329. Global Const $DS_MODALFRAME = 128
  330. Global Const $DS_SETFOREGROUND = 512
  331. Global Const $DS_CONTEXTHELP = 8192
  332. Global Const $WS_EX_ACCEPTFILES = 16
  333. Global Const $WS_EX_MDICHILD = 64
  334. Global Const $WS_EX_APPWINDOW = 262144
  335. Global Const $WS_EX_COMPOSITED = 33554432
  336. Global Const $WS_EX_CLIENTEDGE = 512
  337. Global Const $WS_EX_CONTEXTHELP = 1024
  338. Global Const $WS_EX_DLGMODALFRAME = 1
  339. Global Const $WS_EX_LEFTSCROLLBAR = 16384
  340. Global Const $WS_EX_OVERLAPPEDWINDOW = 768
  341. Global Const $WS_EX_RIGHT = 4096
  342. Global Const $WS_EX_STATICEDGE = 131072
  343. Global Const $WS_EX_TOOLWINDOW = 128
  344. Global Const $WS_EX_TOPMOST = 8
  345. Global Const $WS_EX_TRANSPARENT = 32
  346. Global Const $WS_EX_WINDOWEDGE = 256
  347. Global Const $WS_EX_LAYERED = 524288
  348. Global Const $WS_EX_CONTROLPARENT = 65536
  349. Global Const $WS_EX_LAYOUTRTL = 4194304
  350. Global Const $WS_EX_RTLREADING = 8192
  351. Global Const $WM_GETTEXTLENGTH = 14
  352. Global Const $WM_GETTEXT = 13
  353. Global Const $WM_SIZE = 5
  354. Global Const $WM_SIZING = 532
  355. Global Const $WM_USER = 1024
  356. Global Const $WM_CREATE = 1
  357. Global Const $WM_DESTROY = 2
  358. Global Const $WM_MOVE = 3
  359. Global Const $WM_ACTIVATE = 6
  360. Global Const $WM_SETFOCUS = 7
  361. Global Const $WM_KILLFOCUS = 8
  362. Global Const $WM_ENABLE = 10
  363. Global Const $WM_SETREDRAW = 11
  364. Global Const $WM_SETTEXT = 12
  365. Global Const $WM_PAINT = 15
  366. Global Const $WM_CLOSE = 16
  367. Global Const $WM_QUIT = 18
  368. Global Const $WM_ERASEBKGND = 20
  369. Global Const $WM_SYSCOLORCHANGE = 21
  370. Global Const $WM_SHOWWINDOW = 24
  371. Global Const $WM_WININICHANGE = 26
  372. Global Const $WM_DEVMODECHANGE = 27
  373. Global Const $WM_ACTIVATEAPP = 28
  374. Global Const $WM_FONTCHANGE = 29
  375. Global Const $WM_TIMECHANGE = 30
  376. Global Const $WM_CANCELMODE = 31
  377. Global Const $WM_SETCURSOR = 32
  378. Global Const $WM_MOUSEACTIVATE = 33
  379. Global Const $WM_CHILDACTIVATE = 34
  380. Global Const $WM_QUEUESYNC = 35
  381. Global Const $WM_GETMINMAXINFO = 36
  382. Global Const $WM_PAINTICON = 38
  383. Global Const $WM_ICONERASEBKGND = 39
  384. Global Const $WM_NEXTDLGCTL = 40
  385. Global Const $WM_SPOOLERSTATUS = 42
  386. Global Const $WM_DRAWITEM = 43
  387. Global Const $WM_MEASUREITEM = 44
  388. Global Const $WM_DELETEITEM = 45
  389. Global Const $WM_VKEYTOITEM = 46
  390. Global Const $WM_CHARTOITEM = 47
  391. Global Const $WM_SETFONT = 48
  392. Global Const $WM_GETFONT = 49
  393. Global Const $WM_SETHOTKEY = 50
  394. Global Const $WM_GETHOTKEY = 51
  395. Global Const $WM_QUERYDRAGICON = 55
  396. Global Const $WM_COMPAREITEM = 57
  397. Global Const $WM_GETOBJECT = 61
  398. Global Const $WM_COMPACTING = 65
  399. Global Const $WM_COMMNOTIFY = 68
  400. Global Const $WM_WINDOWPOSCHANGING = 70
  401. Global Const $WM_WINDOWPOSCHANGED = 71
  402. Global Const $WM_POWER = 72
  403. Global Const $WM_NOTIFY = 78
  404. Global Const $WM_COPYDATA = 74
  405. Global Const $WM_CANCELJOURNAL = 75
  406. Global Const $WM_INPUTLANGCHANGEREQUEST = 80
  407. Global Const $WM_INPUTLANGCHANGE = 81
  408. Global Const $WM_TCARD = 82
  409. Global Const $WM_HELP = 83
  410. Global Const $WM_USERCHANGED = 84
  411. Global Const $WM_NOTIFYFORMAT = 85
  412. Global Const $WM_CUT = 768
  413. Global Const $WM_COPY = 769
  414. Global Const $WM_PASTE = 770
  415. Global Const $WM_CLEAR = 771
  416. Global Const $WM_UNDO = 772
  417. Global Const $WM_CONTEXTMENU = 123
  418. Global Const $WM_STYLECHANGING = 124
  419. Global Const $WM_STYLECHANGED = 125
  420. Global Const $WM_DISPLAYCHANGE = 126
  421. Global Const $WM_GETICON = 127
  422. Global Const $WM_SETICON = 128
  423. Global Const $WM_NCCREATE = 129
  424. Global Const $WM_NCDESTROY = 130
  425. Global Const $WM_NCCALCSIZE = 131
  426. Global Const $WM_NCHITTEST = 132
  427. Global Const $WM_NCPAINT = 133
  428. Global Const $WM_NCACTIVATE = 134
  429. Global Const $WM_GETDLGCODE = 135
  430. Global Const $WM_SYNCPAINT = 136
  431. Global Const $WM_NCMOUSEMOVE = 160
  432. Global Const $WM_NCLBUTTONDOWN = 161
  433. Global Const $WM_NCLBUTTONUP = 162
  434. Global Const $WM_NCLBUTTONDBLCLK = 163
  435. Global Const $WM_NCRBUTTONDOWN = 164
  436. Global Const $WM_NCRBUTTONUP = 165
  437. Global Const $WM_NCRBUTTONDBLCLK = 166
  438. Global Const $WM_NCMBUTTONDOWN = 167
  439. Global Const $WM_NCMBUTTONUP = 168
  440. Global Const $WM_NCMBUTTONDBLCLK = 169
  441. Global Const $WM_KEYDOWN = 256
  442. Global Const $WM_KEYUP = 257
  443. Global Const $WM_CHAR = 258
  444. Global Const $WM_DEADCHAR = 259
  445. Global Const $WM_SYSKEYDOWN = 260
  446. Global Const $WM_SYSKEYUP = 261
  447. Global Const $WM_SYSCHAR = 262
  448. Global Const $WM_SYSDEADCHAR = 263
  449. Global Const $WM_INITDIALOG = 272
  450. Global Const $WM_COMMAND = 273
  451. Global Const $WM_SYSCOMMAND = 274
  452. Global Const $WM_TIMER = 275
  453. Global Const $WM_HSCROLL = 276
  454. Global Const $WM_VSCROLL = 277
  455. Global Const $WM_INITMENU = 278
  456. Global Const $WM_INITMENUPOPUP = 279
  457. Global Const $WM_MENUSELECT = 287
  458. Global Const $WM_MENUCHAR = 288
  459. Global Const $WM_ENTERIDLE = 289
  460. Global Const $WM_MENURBUTTONUP = 290
  461. Global Const $WM_MENUDRAG = 291
  462. Global Const $WM_MENUGETOBJECT = 292
  463. Global Const $WM_UNINITMENUPOPUP = 293
  464. Global Const $WM_MENUCOMMAND = 294
  465. Global Const $WM_CHANGEUISTATE = 295
  466. Global Const $WM_UPDATEUISTATE = 296
  467. Global Const $WM_QUERYUISTATE = 297
  468. Global Const $WM_CTLCOLORMSGBOX = 306
  469. Global Const $WM_CTLCOLOREDIT = 307
  470. Global Const $WM_CTLCOLORLISTBOX = 308
  471. Global Const $WM_CTLCOLORBTN = 309
  472. Global Const $WM_CTLCOLORDLG = 310
  473. Global Const $WM_CTLCOLORSCROLLBAR = 311
  474. Global Const $WM_CTLCOLORSTATIC = 312
  475. Global Const $WM_CTLCOLOR = 25
  476. Global Const $MN_GETHMENU = 481
  477. Global Const $NM_FIRST = 0
  478. Global Const $NM_OUTOFMEMORY = $NM_FIRST - 1
  479. Global Const $NM_CLICK = $NM_FIRST - 2
  480. Global Const $NM_DBLCLK = $NM_FIRST - 3
  481. Global Const $NM_RETURN = $NM_FIRST - 4
  482. Global Const $NM_RCLICK = $NM_FIRST - 5
  483. Global Const $NM_RDBLCLK = $NM_FIRST - 6
  484. Global Const $NM_SETFOCUS = $NM_FIRST - 7
  485. Global Const $NM_KILLFOCUS = $NM_FIRST - 8
  486. Global Const $NM_CUSTOMDRAW = $NM_FIRST - 12
  487. Global Const $NM_HOVER = $NM_FIRST - 13
  488. Global Const $NM_NCHITTEST = $NM_FIRST - 14
  489. Global Const $NM_KEYDOWN = $NM_FIRST - 15
  490. Global Const $NM_RELEASEDCAPTURE = $NM_FIRST - 16
  491. Global Const $NM_SETCURSOR = $NM_FIRST - 17
  492. Global Const $NM_CHAR = $NM_FIRST - 18
  493. Global Const $NM_TOOLTIPSCREATED = $NM_FIRST - 19
  494. Global Const $NM_LDOWN = $NM_FIRST - 20
  495. Global Const $NM_RDOWN = $NM_FIRST - 21
  496. Global Const $NM_THEMECHANGED = $NM_FIRST - 22
  497. Global Const $WM_MOUSEMOVE = 512
  498. Global Const $WM_LBUTTONDOWN = 513
  499. Global Const $WM_LBUTTONUP = 514
  500. Global Const $WM_LBUTTONDBLCLK = 515
  501. Global Const $WM_RBUTTONDOWN = 516
  502. Global Const $WM_RBUTTONUP = 517
  503. Global Const $WM_RBUTTONDBLCK = 518
  504. Global Const $WM_MBUTTONDOWN = 519
  505. Global Const $WM_MBUTTONUP = 520
  506. Global Const $WM_MBUTTONDBLCK = 521
  507. Global Const $WM_MOUSEWHEEL = 522
  508. Global Const $WM_XBUTTONDOWN = 523
  509. Global Const $WM_XBUTTONUP = 524
  510. Global Const $WM_XBUTTONDBLCLK = 525
  511. Global Const $WM_MOUSEHWHEEL = 526
  512. Global Const $PS_SOLID = 0
  513. Global Const $PS_DASH = 1
  514. Global Const $PS_DOT = 2
  515. Global Const $PS_DASHDOT = 3
  516. Global Const $PS_DASHDOTDOT = 4
  517. Global Const $PS_NULL = 5
  518. Global Const $PS_INSIDEFRAME = 6
  519. Global Const $LWA_ALPHA = 2
  520. Global Const $LWA_COLORKEY = 1
  521. Global Const $RGN_AND = 1
  522. Global Const $RGN_OR = 2
  523. Global Const $RGN_XOR = 3
  524. Global Const $RGN_DIFF = 4
  525. Global Const $RGN_COPY = 5
  526. Global Const $ERRORREGION = 0
  527. Global Const $NULLREGION = 1
  528. Global Const $SIMPLEREGION = 2
  529. Global Const $COMPLEXREGION = 3
  530. Global Const $TRANSPARENT = 1
  531. Global Const $OPAQUE = 2
  532. Global Const $CCM_FIRST = 8192
  533. Global Const $CCM_GETUNICODEFORMAT = ($CCM_FIRST + 6)
  534. Global Const $CCM_SETUNICODEFORMAT = ($CCM_FIRST + 5)
  535. Global Const $CCM_SETBKCOLOR = $CCM_FIRST + 1
  536. Global Const $CCM_SETCOLORSCHEME = $CCM_FIRST + 2
  537. Global Const $CCM_GETCOLORSCHEME = $CCM_FIRST + 3
  538. Global Const $CCM_GETDROPTARGET = $CCM_FIRST + 4
  539. Global Const $CCM_SETWINDOWTHEME = $CCM_FIRST + 11
  540. Global Const $GA_PARENT = 1
  541. Global Const $GA_ROOT = 2
  542. Global Const $GA_ROOTOWNER = 3
  543. Global Const $SM_CXSCREEN = 0
  544. Global Const $SM_CYSCREEN = 1
  545. Global Const $SM_CXVSCROLL = 2
  546. Global Const $SM_CYHSCROLL = 3
  547. Global Const $SM_CYCAPTION = 4
  548. Global Const $SM_CXBORDER = 5
  549. Global Const $SM_CYBORDER = 6
  550. Global Const $SM_CXDLGFRAME = 7
  551. Global Const $SM_CYDLGFRAME = 8
  552. Global Const $SM_CYVTHUMB = 9
  553. Global Const $SM_CXHTHUMB = 10
  554. Global Const $SM_CXICON = 11
  555. Global Const $SM_CYICON = 12
  556. Global Const $SM_CXCURSOR = 13
  557. Global Const $SM_CYCURSOR = 14
  558. Global Const $SM_CYMENU = 15
  559. Global Const $SM_CXFULLSCREEN = 16
  560. Global Const $SM_CYFULLSCREEN = 17
  561. Global Const $SM_CYKANJIWINDOW = 18
  562. Global Const $SM_MOUSEPRESENT = 19
  563. Global Const $SM_CYVSCROLL = 20
  564. Global Const $SM_CXHSCROLL = 21
  565. Global Const $SM_DEBUG = 22
  566. Global Const $SM_SWAPBUTTON = 23
  567. Global Const $SM_RESERVED1 = 24
  568. Global Const $SM_RESERVED2 = 25
  569. Global Const $SM_RESERVED3 = 26
  570. Global Const $SM_RESERVED4 = 27
  571. Global Const $SM_CXMIN = 28
  572. Global Const $SM_CYMIN = 29
  573. Global Const $SM_CXSIZE = 30
  574. Global Const $SM_CYSIZE = 31
  575. Global Const $SM_CXFRAME = 32
  576. Global Const $SM_CYFRAME = 33
  577. Global Const $SM_CXMINTRACK = 34
  578. Global Const $SM_CYMINTRACK = 35
  579. Global Const $SM_CXDOUBLECLK = 36
  580. Global Const $SM_CYDOUBLECLK = 37
  581. Global Const $SM_CXICONSPACING = 38
  582. Global Const $SM_CYICONSPACING = 39
  583. Global Const $SM_MENUDROPALIGNMENT = 40
  584. Global Const $SM_PENWINDOWS = 41
  585. Global Const $SM_DBCSENABLED = 42
  586. Global Const $SM_CMOUSEBUTTONS = 43
  587. Global Const $SM_SECURE = 44
  588. Global Const $SM_CXEDGE = 45
  589. Global Const $SM_CYEDGE = 46
  590. Global Const $SM_CXMINSPACING = 47
  591. Global Const $SM_CYMINSPACING = 48
  592. Global Const $SM_CXSMICON = 49
  593. Global Const $SM_CYSMICON = 50
  594. Global Const $SM_CYSMCAPTION = 51
  595. Global Const $SM_CXSMSIZE = 52
  596. Global Const $SM_CYSMSIZE = 53
  597. Global Const $SM_CXMENUSIZE = 54
  598. Global Const $SM_CYMENUSIZE = 55
  599. Global Const $SM_ARRANGE = 56
  600. Global Const $SM_CXMINIMIZED = 57
  601. Global Const $SM_CYMINIMIZED = 58
  602. Global Const $SM_CXMAXTRACK = 59
  603. Global Const $SM_CYMAXTRACK = 60
  604. Global Const $SM_CXMAXIMIZED = 61
  605. Global Const $SM_CYMAXIMIZED = 62
  606. Global Const $SM_NETWORK = 63
  607. Global Const $SM_CLEANBOOT = 67
  608. Global Const $SM_CXDRAG = 68
  609. Global Const $SM_CYDRAG = 69
  610. Global Const $SM_SHOWSOUNDS = 70
  611. Global Const $SM_CXMENUCHECK = 71
  612. Global Const $SM_CYMENUCHECK = 72
  613. Global Const $SM_SLOWMACHINE = 73
  614. Global Const $SM_MIDEASTENABLED = 74
  615. Global Const $SM_MOUSEWHEELPRESENT = 75
  616. Global Const $SM_XVIRTUALSCREEN = 76
  617. Global Const $SM_YVIRTUALSCREEN = 77
  618. Global Const $SM_CXVIRTUALSCREEN = 78
  619. Global Const $SM_CYVIRTUALSCREEN = 79
  620. Global Const $SM_CMONITORS = 80
  621. Global Const $SM_SAMEDISPLAYFORMAT = 81
  622. Global Const $SM_IMMENABLED = 82
  623. Global Const $SM_CXFOCUSBORDER = 83
  624. Global Const $SM_CYFOCUSBORDER = 84
  625. Global Const $SM_TABLETPC = 86
  626. Global Const $SM_MEDIACENTER = 87
  627. Global Const $SM_STARTER = 88
  628. Global Const $SM_SERVERR2 = 89
  629. Global Const $SM_CMETRICS = 90
  630. Global Const $SM_REMOTESESSION = 4096
  631. Global Const $SM_SHUTTINGDOWN = 8192
  632. Global Const $SM_REMOTECONTROL = 8193
  633. Global Const $SM_CARETBLINKINGENABLED = 8194
  634. Global Const $BLACKNESS = 66
  635. Global Const $CAPTUREBLT = 1073741824
  636. Global Const $DSTINVERT = 5570569
  637. Global Const $MERGECOPY = 12583114
  638. Global Const $MERGEPAINT = 12255782
  639. Global Const $NOMIRRORBITMAP = -2147483648
  640. Global Const $NOTSRCCOPY = 3342344
  641. Global Const $NOTSRCERASE = 1114278
  642. Global Const $PATCOPY = 15728673
  643. Global Const $PATINVERT = 5898313
  644. Global Const $PATPAINT = 16452105
  645. Global Const $SRCAND = 8913094
  646. Global Const $SRCCOPY = 13369376
  647. Global Const $SRCERASE = 4457256
  648. Global Const $SRCINVERT = 6684742
  649. Global Const $SRCPAINT = 15597702
  650. Global Const $WHITENESS = 16711778
  651. Global Const $DT_BOTTOM = 8
  652. Global Const $DT_CALCRECT = 1024
  653. Global Const $DT_CENTER = 1
  654. Global Const $DT_EDITCONTROL = 8192
  655. Global Const $DT_END_ELLIPSIS = 32768
  656. Global Const $DT_EXPANDTABS = 64
  657. Global Const $DT_EXTERNALLEADING = 512
  658. Global Const $DT_HIDEPREFIX = 1048576
  659. Global Const $DT_INTERNAL = 4096
  660. Global Const $DT_LEFT = 0
  661. Global Const $DT_MODIFYSTRING = 65536
  662. Global Const $DT_NOCLIP = 256
  663. Global Const $DT_NOFULLWIDTHCHARBREAK = 524288
  664. Global Const $DT_NOPREFIX = 2048
  665. Global Const $DT_PATH_ELLIPSIS = 16384
  666. Global Const $DT_PREFIXONLY = 2097152
  667. Global Const $DT_RIGHT = 2
  668. Global Const $DT_RTLREADING = 131072
  669. Global Const $DT_SINGLELINE = 32
  670. Global Const $DT_TABSTOP = 128
  671. Global Const $DT_TOP = 0
  672. Global Const $DT_VCENTER = 4
  673. Global Const $DT_WORDBREAK = 16
  674. Global Const $DT_WORD_ELLIPSIS = 262144
  675. Global Const $RDW_ERASE = 4
  676. Global Const $RDW_FRAME = 1024
  677. Global Const $RDW_INTERNALPAINT = 2
  678. Global Const $RDW_INVALIDATE = 1
  679. Global Const $RDW_NOERASE = 32
  680. Global Const $RDW_NOFRAME = 2048
  681. Global Const $RDW_NOINTERNALPAINT = 16
  682. Global Const $RDW_VALIDATE = 8
  683. Global Const $RDW_ERASENOW = 512
  684. Global Const $RDW_UPDATENOW = 256
  685. Global Const $RDW_ALLCHILDREN = 128
  686. Global Const $RDW_NOCHILDREN = 64
  687. Global Const $WM_RENDERFORMAT = 773
  688. Global Const $WM_RENDERALLFORMATS = 774
  689. Global Const $WM_DESTROYCLIPBOARD = 775
  690. Global Const $WM_DRAWCLIPBOARD = 776
  691. Global Const $WM_PAINTCLIPBOARD = 777
  692. Global Const $WM_VSCROLLCLIPBOARD = 778
  693. Global Const $WM_SIZECLIPBOARD = 779
  694. Global Const $WM_ASKCBFORMATNAME = 780
  695. Global Const $WM_CHANGECBCHAIN = 781
  696. Global Const $WM_HSCROLLCLIPBOARD = 782
  697. Global Const $HTERROR = -2
  698. Global Const $HTTRANSPARENT = -1
  699. Global Const $HTNOWHERE = 0
  700. Global Const $HTCLIENT = 1
  701. Global Const $HTCAPTION = 2
  702. Global Const $HTSYSMENU = 3
  703. Global Const $HTGROWBOX = 4
  704. Global Const $HTSIZE = $HTGROWBOX
  705. Global Const $HTMENU = 5
  706. Global Const $HTHSCROLL = 6
  707. Global Const $HTVSCROLL = 7
  708. Global Const $HTMINBUTTON = 8
  709. Global Const $HTMAXBUTTON = 9
  710. Global Const $HTLEFT = 10
  711. Global Const $HTRIGHT = 11
  712. Global Const $HTTOP = 12
  713. Global Const $HTTOPLEFT = 13
  714. Global Const $HTTOPRIGHT = 14
  715. Global Const $HTBOTTOM = 15
  716. Global Const $HTBOTTOMLEFT = 16
  717. Global Const $HTBOTTOMRIGHT = 17
  718. Global Const $HTBORDER = 18
  719. Global Const $HTREDUCE = $HTMINBUTTON
  720. Global Const $HTZOOM = $HTMAXBUTTON
  721. Global Const $HTSIZEFIRST = $HTLEFT
  722. Global Const $HTSIZELAST = $HTBOTTOMRIGHT
  723. Global Const $HTOBJECT = 19
  724. Global Const $HTCLOSE = 20
  725. Global Const $HTHELP = 21
  726. Global Const $COLOR_SCROLLBAR = 0
  727. Global Const $COLOR_BACKGROUND = 1
  728. Global Const $COLOR_ACTIVECAPTION = 2
  729. Global Const $COLOR_INACTIVECAPTION = 3
  730. Global Const $COLOR_MENU = 4
  731. Global Const $COLOR_WINDOW = 5
  732. Global Const $COLOR_WINDOWFRAME = 6
  733. Global Const $COLOR_MENUTEXT = 7
  734. Global Const $COLOR_WINDOWTEXT = 8
  735. Global Const $COLOR_CAPTIONTEXT = 9
  736. Global Const $COLOR_ACTIVEBORDER = 10
  737. Global Const $COLOR_INACTIVEBORDER = 11
  738. Global Const $COLOR_APPWORKSPACE = 12
  739. Global Const $COLOR_HIGHLIGHT = 13
  740. Global Const $COLOR_HIGHLIGHTTEXT = 14
  741. Global Const $COLOR_BTNFACE = 15
  742. Global Const $COLOR_BTNSHADOW = 16
  743. Global Const $COLOR_GRAYTEXT = 17
  744. Global Const $COLOR_BTNTEXT = 18
  745. Global Const $COLOR_INACTIVECAPTIONTEXT = 19
  746. Global Const $COLOR_BTNHIGHLIGHT = 20
  747. Global Const $COLOR_3DDKSHADOW = 21
  748. Global Const $COLOR_3DLIGHT = 22
  749. Global Const $COLOR_INFOTEXT = 23
  750. Global Const $COLOR_INFOBK = 24
  751. Global Const $COLOR_HOTLIGHT = 26
  752. Global Const $COLOR_GRADIENTACTIVECAPTION = 27
  753. Global Const $COLOR_GRADIENTINACTIVECAPTION = 28
  754. Global Const $COLOR_MENUHILIGHT = 29
  755. Global Const $COLOR_MENUBAR = 30
  756. Global Const $COLOR_DESKTOP = 1
  757. Global Const $COLOR_3DFACE = 15
  758. Global Const $COLOR_3DSHADOW = 16
  759. Global Const $COLOR_3DHIGHLIGHT = 20
  760. Global Const $COLOR_3DHILIGHT = 20
  761. Global Const $COLOR_BTNHILIGHT = 20
  762. Global Const $HINST_COMMCTRL = -1
  763. Global Const $IDB_STD_SMALL_COLOR = 0
  764. Global Const $IDB_STD_LARGE_COLOR = 1
  765. Global Const $IDB_VIEW_SMALL_COLOR = 4
  766. Global Const $IDB_VIEW_LARGE_COLOR = 5
  767. Global Const $IDB_HIST_SMALL_COLOR = 8
  768. Global Const $IDB_HIST_LARGE_COLOR = 9
  769. Global Const $STARTF_FORCEOFFFEEDBACK = 128
  770. Global Const $STARTF_FORCEONFEEDBACK = 64
  771. Global Const $STARTF_RUNFULLSCREEN = 32
  772. Global Const $STARTF_USECOUNTCHARS = 8
  773. Global Const $STARTF_USEFILLATTRIBUTE = 16
  774. Global Const $STARTF_USEHOTKEY = 512
  775. Global Const $STARTF_USEPOSITION = 4
  776. Global Const $STARTF_USESHOWWINDOW = 1
  777. Global Const $STARTF_USESIZE = 2
  778. Global Const $STARTF_USESTDHANDLES = 256
  779. Global Const $CDDS_PREPAINT = 1
  780. Global Const $CDDS_POSTPAINT = 2
  781. Global Const $CDDS_PREERASE = 3
  782. Global Const $CDDS_POSTERASE = 4
  783. Global Const $CDDS_ITEM = 65536
  784. Global Const $CDDS_ITEMPREPAINT = 65537
  785. Global Const $CDDS_ITEMPOSTPAINT = 65538
  786. Global Const $CDDS_ITEMPREERASE = 65539
  787. Global Const $CDDS_ITEMPOSTERASE = 65540
  788. Global Const $CDDS_SUBITEM = 131072
  789. Global Const $CDIS_SELECTED = 1
  790. Global Const $CDIS_GRAYED = 2
  791. Global Const $CDIS_DISABLED = 4
  792. Global Const $CDIS_CHECKED = 8
  793. Global Const $CDIS_FOCUS = 16
  794. Global Const $CDIS_DEFAULT = 32
  795. Global Const $CDIS_HOT = 64
  796. Global Const $CDIS_MARKED = 128
  797. Global Const $CDIS_INDETERMINATE = 256
  798. Global Const $CDIS_SHOWKEYBOARDCUES = 512
  799. Global Const $CDIS_NEARHOT = 1024
  800. Global Const $CDIS_OTHERSIDEHOT = 2048
  801. Global Const $CDIS_DROPHILITED = 4096
  802. Global Const $CDRF_DODEFAULT = 0
  803. Global Const $CDRF_NEWFONT = 2
  804. Global Const $CDRF_SKIPDEFAULT = 4
  805. Global Const $CDRF_NOTIFYPOSTPAINT = 16
  806. Global Const $CDRF_NOTIFYITEMDRAW = 32
  807. Global Const $CDRF_NOTIFYSUBITEMDRAW = 32
  808. Global Const $CDRF_NOTIFYPOSTERASE = 64
  809. Global Const $CDRF_DOERASE = 8
  810. Global Const $CDRF_SKIPPOSTPAINT = 256
  811. Global Const $GUI_SS_DEFAULT_GUI = BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU)
  812. Dim $ADRESS1
  813. Dim $ADRESS2
  814. Dim $ADRESS3
  815. Dim $ADRESS4
  816. Dim $ADRESS5
  817. Dim $ID
  818. $ADRESS1 = 5305788
  819. $ADRESS2 = 5305784
  820. $ADRESS3 = 5305780
  821. $ADRESS4 = 5292380
  822. $ADRESS5 = 5292376
  823. $ADRESS6 = 5292384
  824. Func PW()
  825.     $VALUE = 5
  826.     $ID = _MEMORYOPEN(ProcessExists("BeatHazard.exe"))
  827.     _MEMORYWRITE($ADRESS1, $ID, $VALUE)
  828.     _MEMORYCLOSE($ID)
  829. EndFunc
  830. Func VL()
  831.     $VALUE = 5
  832.     $ID = _MEMORYOPEN(ProcessExists("BeatHazard.exe"))
  833.     _MEMORYWRITE($ADRESS2, $ID, $VALUE)
  834.     _MEMORYCLOSE($ID)
  835. EndFunc
  836. Func LF()
  837.     $VALUE = $INPUT1
  838.     $ID = _MEMORYOPEN(ProcessExists("BeatHazard.exe"))
  839.     _MEMORYWRITE($ADRESS4, $ID, $VALUE)
  840.     _MEMORYCLOSE($ID)
  841. EndFunc
  842. Func MP()
  843.     $VALUE = 99
  844.     $ID = _MEMORYOPEN(ProcessExists("BeatHazard.exe"))
  845.     _MEMORYWRITE($ADRESS3, $ID, $VALUE)
  846.     _MEMORYCLOSE($ID)
  847. EndFunc
  848. Func BB()
  849.     $VALUE = $INPUT1
  850.     $ID = _MEMORYOPEN(ProcessExists("BeatHazard.exe"))
  851.     _MEMORYWRITE($ADRESS6, $ID, $VALUE)
  852.     _MEMORYCLOSE($ID)
  853. EndFunc
  854. Global Const $ES_LEFT = 0
  855. Global Const $ES_CENTER = 1
  856. Global Const $ES_RIGHT = 2
  857. Global Const $ES_MULTILINE = 4
  858. Global Const $ES_UPPERCASE = 8
  859. Global Const $ES_LOWERCASE = 16
  860. Global Const $ES_PASSWORD = 32
  861. Global Const $ES_AUTOVSCROLL = 64
  862. Global Const $ES_AUTOHSCROLL = 128
  863. Global Const $ES_NOHIDESEL = 256
  864. Global Const $ES_OEMCONVERT = 1024
  865. Global Const $ES_READONLY = 2048
  866. Global Const $ES_WANTRETURN = 4096
  867. Global Const $ES_NUMBER = 8192
  868. Global Const $EC_ERR = -1
  869. Global Const $ECM_FIRST = 5376
  870. Global Const $EM_CANUNDO = 198
  871. Global Const $EM_CHARFROMPOS = 215
  872. Global Const $EM_EMPTYUNDOBUFFER = 205
  873. Global Const $EM_FMTLINES = 200
  874. Global Const $EM_GETCUEBANNER = ($ECM_FIRST + 2)
  875. Global Const $EM_GETFIRSTVISIBLELINE = 206
  876. Global Const $EM_GETHANDLE = 189
  877. Global Const $EM_GETIMESTATUS = 217
  878. Global Const $EM_GETLIMITTEXT = 213
  879. Global Const $EM_GETLINE = 196
  880. Global Const $EM_GETLINECOUNT = 186
  881. Global Const $EM_GETMARGINS = 212
  882. Global Const $EM_GETMODIFY = 184
  883. Global Const $EM_GETPASSWORDCHAR = 210
  884. Global Const $EM_GETRECT = 178
  885. Global Const $EM_GETSEL = 176
  886. Global Const $EM_GETTHUMB = 190
  887. Global Const $EM_GETWORDBREAKPROC = 209
  888. Global Const $EM_HIDEBALLOONTIP = ($ECM_FIRST + 4)
  889. Global Const $EM_LIMITTEXT = 197
  890. Global Const $EM_LINEFROMCHAR = 201
  891. Global Const $EM_LINEINDEX = 187
  892. Global Const $EM_LINELENGTH = 193
  893. Global Const $EM_LINESCROLL = 182
  894. Global Const $EM_POSFROMCHAR = 214
  895. Global Const $EM_REPLACESEL = 194
  896. Global Const $EM_SCROLL = 181
  897. Global Const $EM_SCROLLCARET = 183
  898. Global Const $EM_SETCUEBANNER = ($ECM_FIRST + 1)
  899. Global Const $EM_SETHANDLE = 188
  900. Global Const $EM_SETIMESTATUS = 216
  901. Global Const $EM_SETLIMITTEXT = $EM_LIMITTEXT
  902. Global Const $EM_SETMARGINS = 211
  903. Global Const $EM_SETMODIFY = 185
  904. Global Const $EM_SETPASSWORDCHAR = 204
  905. Global Const $EM_SETREADONLY = 207
  906. Global Const $EM_SETRECT = 179
  907. Global Const $EM_SETRECTNP = 180
  908. Global Const $EM_SETSEL = 177
  909. Global Const $EM_SETTABSTOPS = 203
  910. Global Const $EM_SETWORDBREAKPROC = 208
  911. Global Const $EM_SHOWBALLOONTIP = ($ECM_FIRST + 3)
  912. Global Const $EM_UNDO = 199
  913. Global Const $EC_LEFTMARGIN = 1
  914. Global Const $EC_RIGHTMARGIN = 2
  915. Global Const $EC_USEFONTINFO = 65535
  916. Global Const $EMSIS_COMPOSITIONSTRING = 1
  917. Global Const $EIMES_GETCOMPSTRATONCE = 1
  918. Global Const $EIMES_CANCELCOMPSTRINFOCUS = 2
  919. Global Const $EIMES_COMPLETECOMPSTRKILLFOCUS = 4
  920. Global Const $EN_ALIGN_LTR_EC = 1792
  921. Global Const $EN_ALIGN_RTL_EC = 1793
  922. Global Const $EN_CHANGE = 768
  923. Global Const $EN_ERRSPACE = 1280
  924. Global Const $EN_HSCROLL = 1537
  925. Global Const $EN_KILLFOCUS = 512
  926. Global Const $EN_MAXTEXT = 1281
  927. Global Const $EN_SETFOCUS = 256
  928. Global Const $EN_UPDATE = 1024
  929. Global Const $EN_VSCROLL = 1538
  930. Global Const $TTI_NONE = 0
  931. Global Const $TTI_INFO = 1
  932. Global Const $TTI_WARNING = 2
  933. Global Const $TTI_ERROR = 3
  934. Global Const $TTI_INFO_LARGE = 4
  935. Global Const $TTI_WARNING_LARGE = 5
  936. Global Const $TTI_ERROR_LARGE = 6
  937. Global Const $__EDITCONSTANT_WS_VSCROLL = 2097152
  938. Global Const $__EDITCONSTANT_WS_HSCROLL = 1048576
  939. Global Const $GUI_SS_DEFAULT_EDIT = BitOR($ES_WANTRETURN, $__EDITCONSTANT_WS_VSCROLL, $__EDITCONSTANT_WS_HSCROLL, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL)
  940. Global Const $GUI_SS_DEFAULT_INPUT = BitOR($ES_LEFT, $ES_AUTOHSCROLL)
  941. #Region ### START Koda GUI section ### Form=
  942. $FORM1 = GUICreate("Beat Hazard Trainer", 218, 359, 389, 87)
  943. GUISetBkColor(255)
  944. $LABEL1 = GUICtrlCreateLabel("Beat Hazard Trainer", 16, 8, 190, 28)
  945. GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
  946. GUICtrlSetColor(-1, 16711680)
  947. $BUTTON1 = GUICtrlCreateButton("Max Power", 24, 80, 163, 33)
  948. $BUTTON2 = GUICtrlCreateButton("Max Volume", 24, 128, 163, 33)
  949. $GROUP1 = GUICtrlCreateGroup("Extra Options:", 24, 168, 161, 177)
  950. $INPUT1 = GUICtrlCreateInput("Input1", 112, 184, 65, 21)
  951. $BUTTON3 = GUICtrlCreateButton("Lifes", 32, 184, 57, 25)
  952. $BUTTON4 = GUICtrlCreateButton("99x Score Multiplier", 32, 224, 147, 25)
  953. $BUTTON5 = GUICtrlCreateButton("Super Bombs", 32, 264, 145, 25)
  954. $BUTTON6 = GUICtrlCreateButton("Exit", 112, 304, 65, 25)
  955. $BUTTON7 = GUICtrlCreateButton("Information", 32, 304, 65, 25)
  956. GUICtrlCreateGroup("", -99, -99, 1, 1)
  957. $LABEL2 = GUICtrlCreateLabel("Beat Hazard: Running", 16, 48, 182, 24)
  958. GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
  959. GUICtrlSetColor(-1, 65280)
  960. GUISetState(@SW_SHOW)
  961. #EndRegion ### END Koda GUI section ###
  962. If ProcessExists("BeatHazard.exe") Then
  963.     MsgBox(0, "Beat Hazard Trainer", "Beat Hazard Running, Press Ok and Select Your Options.")
  964. Else
  965.     MsgBox(0, "Beat Hazard Trainer", "Beat Hazard Not Running, Please Run The Game And Them Run the Trainer.")
  966.     Exit
  967. EndIf
  968. While 1
  969.     $NMSG = GUIGetMsg()
  970.     Switch $NMSG
  971.         Case $GUI_EVENT_CLOSE
  972.             Exit
  973.         Case $BUTTON1
  974.             PW()
  975.         Case $BUTTON2
  976.             VL()
  977.         Case $BUTTON3
  978.             LF()
  979.         Case $BUTTON4
  980.             MP()
  981.         Case $BUTTON5
  982.             BB()
  983.         Case $BUTTON6
  984.             Exit
  985.         Case $BUTTON7
  986.             MsgBox(0, "Beat Hazard Trainer", "Trainer Made By xXBarataXx" & @CRLF & "Version 1.1 With GUI" & @CRLF & "Special Thanks To aosma8")
  987.     EndSwitch
  988. WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement