Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 130.51 KB | None | 0 0
  1. #Region
  2. #AutoIt3Wrapper_OutFile=AOMH Updated 4-27.exe
  3. #AutoIt3Wrapper_UseUpx=n
  4. #AutoIt3Wrapper_UseX64=n
  5. #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
  6. #EndRegion
  7. Global Const $ws_ex_clientedge = 512
  8. Global Const $bs_groupbox = 7
  9. Global Const $bs_bottom = 2048
  10. Global Const $bs_center = 768
  11. Global Const $bs_defpushbutton = 1
  12. Global Const $bs_left = 256
  13. Global Const $bs_multiline = 8192
  14. Global Const $bs_pushbox = 10
  15. Global Const $bs_pushlike = 4096
  16. Global Const $bs_right = 512
  17. Global Const $bs_rightbutton = 32
  18. Global Const $bs_top = 1024
  19. Global Const $bs_vcenter = 3072
  20. Global Const $bs_flat = 32768
  21. Global Const $bs_icon = 64
  22. Global Const $bs_bitmap = 128
  23. Global Const $bs_notify = 16384
  24. Global Const $bs_splitbutton = 12
  25. Global Const $bs_defsplitbutton = 13
  26. Global Const $bs_commandlink = 14
  27. Global Const $bs_defcommandlink = 15
  28. Global Const $bcsif_glyph = 1
  29. Global Const $bcsif_image = 2
  30. Global Const $bcsif_style = 4
  31. Global Const $bcsif_size = 8
  32. Global Const $bcss_nosplit = 1
  33. Global Const $bcss_stretch = 2
  34. Global Const $bcss_alignleft = 4
  35. Global Const $bcss_image = 8
  36. Global Const $button_imagelist_align_left = 0
  37. Global Const $button_imagelist_align_right = 1
  38. Global Const $button_imagelist_align_top = 2
  39. Global Const $button_imagelist_align_bottom = 3
  40. Global Const $button_imagelist_align_center = 4
  41. Global Const $bs_3state = 5
  42. Global Const $bs_auto3state = 6
  43. Global Const $bs_autocheckbox = 3
  44. Global Const $bs_checkbox = 2
  45. Global Const $bs_radiobutton = 4
  46. Global Const $bs_autoradiobutton = 9
  47. Global Const $bs_ownerdraw = 11
  48. Global Const $gui_ss_default_button = 0
  49. Global Const $gui_ss_default_checkbox = 0
  50. Global Const $gui_ss_default_group = 0
  51. Global Const $gui_ss_default_radio = 0
  52. Global Const $bcm_first = 5632
  53. Global Const $bcm_getidealsize = ($bcm_first + 1)
  54. Global Const $bcm_getimagelist = ($bcm_first + 3)
  55. Global Const $bcm_getnote = ($bcm_first + 10)
  56. Global Const $bcm_getnotelength = ($bcm_first + 11)
  57. Global Const $bcm_getsplitinfo = ($bcm_first + 8)
  58. Global Const $bcm_gettextmargin = ($bcm_first + 5)
  59. Global Const $bcm_setdropdownstate = ($bcm_first + 6)
  60. Global Const $bcm_setimagelist = ($bcm_first + 2)
  61. Global Const $bcm_setnote = ($bcm_first + 9)
  62. Global Const $bcm_setshield = ($bcm_first + 12)
  63. Global Const $bcm_setsplitinfo = ($bcm_first + 7)
  64. Global Const $bcm_settextmargin = ($bcm_first + 4)
  65. Global Const $bm_click = 245
  66. Global Const $bm_getcheck = 240
  67. Global Const $bm_getimage = 246
  68. Global Const $bm_getstate = 242
  69. Global Const $bm_setcheck = 241
  70. Global Const $bm_setdontclick = 248
  71. Global Const $bm_setimage = 247
  72. Global Const $bm_setstate = 243
  73. Global Const $bm_setstyle = 244
  74. Global Const $bcn_first = -1250
  75. Global Const $bcn_dropdown = ($bcn_first + 2)
  76. Global Const $bcn_hotitemchange = ($bcn_first + 1)
  77. Global Const $bn_clicked = 0
  78. Global Const $bn_paint = 1
  79. Global Const $bn_hilite = 2
  80. Global Const $bn_unhilite = 3
  81. Global Const $bn_disable = 4
  82. Global Const $bn_doubleclicked = 5
  83. Global Const $bn_setfocus = 6
  84. Global Const $bn_killfocus = 7
  85. Global Const $bn_pushed = $bn_hilite
  86. Global Const $bn_unpushed = $bn_unhilite
  87. Global Const $bn_dblclk = $bn_doubleclicked
  88. Global Const $bst_checked = 1
  89. Global Const $bst_indeterminate = 2
  90. Global Const $bst_unchecked = 0
  91. Global Const $bst_focus = 8
  92. Global Const $bst_pushed = 4
  93. Global Const $bst_dontclick = 128
  94. Global Const $cb_err = -1
  95. Global Const $cb_errattribute = -3
  96. Global Const $cb_errrequired = -4
  97. Global Const $cb_errspace = -2
  98. Global Const $cb_okay = 0
  99. Global Const $state_system_invisible = 32768
  100. Global Const $state_system_pressed = 8
  101. Global Const $cbs_autohscroll = 64
  102. Global Const $cbs_disablenoscroll = 2048
  103. Global Const $cbs_dropdown = 2
  104. Global Const $cbs_dropdownlist = 3
  105. Global Const $cbs_hasstrings = 512
  106. Global Const $cbs_lowercase = 16384
  107. Global Const $cbs_nointegralheight = 1024
  108. Global Const $cbs_oemconvert = 128
  109. Global Const $cbs_ownerdrawfixed = 16
  110. Global Const $cbs_ownerdrawvariable = 32
  111. Global Const $cbs_simple = 1
  112. Global Const $cbs_sort = 256
  113. Global Const $cbs_uppercase = 8192
  114. Global Const $cbm_first = 5888
  115. Global Const $cb_addstring = 323
  116. Global Const $cb_deletestring = 324
  117. Global Const $cb_dir = 325
  118. Global Const $cb_findstring = 332
  119. Global Const $cb_findstringexact = 344
  120. Global Const $cb_getcomboboxinfo = 356
  121. Global Const $cb_getcount = 326
  122. Global Const $cb_getcuebanner = ($cbm_first + 4)
  123. Global Const $cb_getcursel = 327
  124. Global Const $cb_getdroppedcontrolrect = 338
  125. Global Const $cb_getdroppedstate = 343
  126. Global Const $cb_getdroppedwidth = 351
  127. Global Const $cb_geteditsel = 320
  128. Global Const $cb_getextendedui = 342
  129. Global Const $cb_gethorizontalextent = 349
  130. Global Const $cb_getitemdata = 336
  131. Global Const $cb_getitemheight = 340
  132. Global Const $cb_getlbtext = 328
  133. Global Const $cb_getlbtextlen = 329
  134. Global Const $cb_getlocale = 346
  135. Global Const $cb_getminvisible = 5890
  136. Global Const $cb_gettopindex = 347
  137. Global Const $cb_initstorage = 353
  138. Global Const $cb_limittext = 321
  139. Global Const $cb_resetcontent = 331
  140. Global Const $cb_insertstring = 330
  141. Global Const $cb_selectstring = 333
  142. Global Const $cb_setcuebanner = ($cbm_first + 3)
  143. Global Const $cb_setcursel = 334
  144. Global Const $cb_setdroppedwidth = 352
  145. Global Const $cb_seteditsel = 322
  146. Global Const $cb_setextendedui = 341
  147. Global Const $cb_sethorizontalextent = 350
  148. Global Const $cb_setitemdata = 337
  149. Global Const $cb_setitemheight = 339
  150. Global Const $cb_setlocale = 345
  151. Global Const $cb_setminvisible = 5889
  152. Global Const $cb_settopindex = 348
  153. Global Const $cb_showdropdown = 335
  154. Global Const $cbn_closeup = 8
  155. Global Const $cbn_dblclk = 2
  156. Global Const $cbn_dropdown = 7
  157. Global Const $cbn_editchange = 5
  158. Global Const $cbn_editupdate = 6
  159. Global Const $cbn_errspace = (-1)
  160. Global Const $cbn_killfocus = 4
  161. Global Const $cbn_selchange = 1
  162. Global Const $cbn_selendcancel = 10
  163. Global Const $cbn_selendok = 9
  164. Global Const $cbn_setfocus = 3
  165. Global Const $cbes_ex_casesensitive = 16
  166. Global Const $cbes_ex_noeditimage = 1
  167. Global Const $cbes_ex_noeditimageindent = 2
  168. Global Const $cbes_ex_nosizelimit = 8
  169. Global Const $cbes_ex_pathwordbreakproc = 4
  170. Global Const $__comboboxconstant_wm_user = 1024
  171. Global Const $cbem_deleteitem = $cb_deletestring
  172. Global Const $cbem_getcombocontrol = ($__comboboxconstant_wm_user + 6)
  173. Global Const $cbem_geteditcontrol = ($__comboboxconstant_wm_user + 7)
  174. Global Const $cbem_getexstyle = ($__comboboxconstant_wm_user + 9)
  175. Global Const $cbem_getextendedstyle = ($__comboboxconstant_wm_user + 9)
  176. Global Const $cbem_getimagelist = ($__comboboxconstant_wm_user + 3)
  177. Global Const $cbem_getitema = ($__comboboxconstant_wm_user + 4)
  178. Global Const $cbem_getitemw = ($__comboboxconstant_wm_user + 13)
  179. Global Const $cbem_getunicodeformat = 8192 + 6
  180. Global Const $cbem_haseditchanged = ($__comboboxconstant_wm_user + 10)
  181. Global Const $cbem_insertitema = ($__comboboxconstant_wm_user + 1)
  182. Global Const $cbem_insertitemw = ($__comboboxconstant_wm_user + 11)
  183. Global Const $cbem_setexstyle = ($__comboboxconstant_wm_user + 8)
  184. Global Const $cbem_setextendedstyle = ($__comboboxconstant_wm_user + 14)
  185. Global Const $cbem_setimagelist = ($__comboboxconstant_wm_user + 2)
  186. Global Const $cbem_setitema = ($__comboboxconstant_wm_user + 5)
  187. Global Const $cbem_setitemw = ($__comboboxconstant_wm_user + 12)
  188. Global Const $cbem_setunicodeformat = 8192 + 5
  189. Global Const $cbem_setwindowtheme = 8192 + 11
  190. Global Const $cben_first = (-800)
  191. Global Const $cben_last = (-830)
  192. Global Const $cben_beginedit = ($cben_first - 4)
  193. Global Const $cben_deleteitem = ($cben_first - 2)
  194. Global Const $cben_dragbegina = ($cben_first - 8)
  195. Global Const $cben_dragbeginw = ($cben_first - 9)
  196. Global Const $cben_endedita = ($cben_first - 5)
  197. Global Const $cben_endeditw = ($cben_first - 6)
  198. Global Const $cben_getdispinfo = ($cben_first - 0)
  199. Global Const $cben_getdispinfoa = ($cben_first - 0)
  200. Global Const $cben_getdispinfow = ($cben_first - 7)
  201. Global Const $cben_insertitem = ($cben_first - 1)
  202. Global Const $cbeif_di_setitem = 268435456
  203. Global Const $cbeif_image = 2
  204. Global Const $cbeif_indent = 16
  205. Global Const $cbeif_lparam = 32
  206. Global Const $cbeif_overlay = 8
  207. Global Const $cbeif_selectedimage = 4
  208. Global Const $cbeif_text = 1
  209. Global Const $__comboboxconstant_ws_vscroll = 2097152
  210. Global Const $gui_ss_default_combo = BitOR($cbs_dropdown, $cbs_autohscroll, $__comboboxconstant_ws_vscroll)
  211. Global Const $es_left = 0
  212. Global Const $es_center = 1
  213. Global Const $es_right = 2
  214. Global Const $es_multiline = 4
  215. Global Const $es_uppercase = 8
  216. Global Const $es_lowercase = 16
  217. Global Const $es_password = 32
  218. Global Const $es_autovscroll = 64
  219. Global Const $es_autohscroll = 128
  220. Global Const $es_nohidesel = 256
  221. Global Const $es_oemconvert = 1024
  222. Global Const $es_readonly = 2048
  223. Global Const $es_wantreturn = 4096
  224. Global Const $es_number = 8192
  225. Global Const $ec_err = -1
  226. Global Const $ecm_first = 5376
  227. Global Const $em_canundo = 198
  228. Global Const $em_charfrompos = 215
  229. Global Const $em_emptyundobuffer = 205
  230. Global Const $em_fmtlines = 200
  231. Global Const $em_getcuebanner = ($ecm_first + 2)
  232. Global Const $em_getfirstvisibleline = 206
  233. Global Const $em_gethandle = 189
  234. Global Const $em_getimestatus = 217
  235. Global Const $em_getlimittext = 213
  236. Global Const $em_getline = 196
  237. Global Const $em_getlinecount = 186
  238. Global Const $em_getmargins = 212
  239. Global Const $em_getmodify = 184
  240. Global Const $em_getpasswordchar = 210
  241. Global Const $em_getrect = 178
  242. Global Const $em_getsel = 176
  243. Global Const $em_getthumb = 190
  244. Global Const $em_getwordbreakproc = 209
  245. Global Const $em_hideballoontip = ($ecm_first + 4)
  246. Global Const $em_limittext = 197
  247. Global Const $em_linefromchar = 201
  248. Global Const $em_lineindex = 187
  249. Global Const $em_linelength = 193
  250. Global Const $em_linescroll = 182
  251. Global Const $em_posfromchar = 214
  252. Global Const $em_replacesel = 194
  253. Global Const $em_scroll = 181
  254. Global Const $em_scrollcaret = 183
  255. Global Const $em_setcuebanner = ($ecm_first + 1)
  256. Global Const $em_sethandle = 188
  257. Global Const $em_setimestatus = 216
  258. Global Const $em_setlimittext = $em_limittext
  259. Global Const $em_setmargins = 211
  260. Global Const $em_setmodify = 185
  261. Global Const $em_setpasswordchar = 204
  262. Global Const $em_setreadonly = 207
  263. Global Const $em_setrect = 179
  264. Global Const $em_setrectnp = 180
  265. Global Const $em_setsel = 177
  266. Global Const $em_settabstops = 203
  267. Global Const $em_setwordbreakproc = 208
  268. Global Const $em_showballoontip = ($ecm_first + 3)
  269. Global Const $em_undo = 199
  270. Global Const $ec_leftmargin = 1
  271. Global Const $ec_rightmargin = 2
  272. Global Const $ec_usefontinfo = 65535
  273. Global Const $emsis_compositionstring = 1
  274. Global Const $eimes_getcompstratonce = 1
  275. Global Const $eimes_cancelcompstrinfocus = 2
  276. Global Const $eimes_completecompstrkillfocus = 4
  277. Global Const $en_align_ltr_ec = 1792
  278. Global Const $en_align_rtl_ec = 1793
  279. Global Const $en_change = 768
  280. Global Const $en_errspace = 1280
  281. Global Const $en_hscroll = 1537
  282. Global Const $en_killfocus = 512
  283. Global Const $en_maxtext = 1281
  284. Global Const $en_setfocus = 256
  285. Global Const $en_update = 1024
  286. Global Const $en_vscroll = 1538
  287. Global Const $tti_none = 0
  288. Global Const $tti_info = 1
  289. Global Const $tti_warning = 2
  290. Global Const $tti_error = 3
  291. Global Const $tti_info_large = 4
  292. Global Const $tti_warning_large = 5
  293. Global Const $tti_error_large = 6
  294. Global Const $__editconstant_ws_vscroll = 2097152
  295. Global Const $__editconstant_ws_hscroll = 1048576
  296. Global Const $gui_ss_default_edit = BitOR($es_wantreturn, $__editconstant_ws_vscroll, $__editconstant_ws_hscroll, $es_autovscroll, $es_autohscroll)
  297. Global Const $gui_ss_default_input = BitOR($es_left, $es_autohscroll)
  298. Global Const $gui_event_close = -3
  299. Global Const $gui_event_minimize = -4
  300. Global Const $gui_event_restore = -5
  301. Global Const $gui_event_maximize = -6
  302. Global Const $gui_event_primarydown = -7
  303. Global Const $gui_event_primaryup = -8
  304. Global Const $gui_event_secondarydown = -9
  305. Global Const $gui_event_secondaryup = -10
  306. Global Const $gui_event_mousemove = -11
  307. Global Const $gui_event_resized = -12
  308. Global Const $gui_event_dropped = -13
  309. Global Const $gui_rundefmsg = "GUI_RUNDEFMSG"
  310. Global Const $gui_avistop = 0
  311. Global Const $gui_avistart = 1
  312. Global Const $gui_aviclose = 2
  313. Global Const $gui_checked = 1
  314. Global Const $gui_indeterminate = 2
  315. Global Const $gui_unchecked = 4
  316. Global Const $gui_dropaccepted = 8
  317. Global Const $gui_nodropaccepted = 4096
  318. Global Const $gui_acceptfiles = $gui_dropaccepted
  319. Global Const $gui_show = 16
  320. Global Const $gui_hide = 32
  321. Global Const $gui_enable = 64
  322. Global Const $gui_disable = 128
  323. Global Const $gui_focus = 256
  324. Global Const $gui_nofocus = 8192
  325. Global Const $gui_defbutton = 512
  326. Global Const $gui_expand = 1024
  327. Global Const $gui_ontop = 2048
  328. Global Const $gui_fontitalic = 2
  329. Global Const $gui_fontunder = 4
  330. Global Const $gui_fontstrike = 8
  331. Global Const $gui_dockauto = 1
  332. Global Const $gui_dockleft = 2
  333. Global Const $gui_dockright = 4
  334. Global Const $gui_dockhcenter = 8
  335. Global Const $gui_docktop = 32
  336. Global Const $gui_dockbottom = 64
  337. Global Const $gui_dockvcenter = 128
  338. Global Const $gui_dockwidth = 256
  339. Global Const $gui_dockheight = 512
  340. Global Const $gui_docksize = 768
  341. Global Const $gui_dockmenubar = 544
  342. Global Const $gui_dockstatebar = 576
  343. Global Const $gui_dockall = 802
  344. Global Const $gui_dockborders = 102
  345. Global Const $gui_gr_close = 1
  346. Global Const $gui_gr_line = 2
  347. Global Const $gui_gr_bezier = 4
  348. Global Const $gui_gr_move = 6
  349. Global Const $gui_gr_color = 8
  350. Global Const $gui_gr_rect = 10
  351. Global Const $gui_gr_ellipse = 12
  352. Global Const $gui_gr_pie = 14
  353. Global Const $gui_gr_dot = 16
  354. Global Const $gui_gr_pixel = 18
  355. Global Const $gui_gr_hint = 20
  356. Global Const $gui_gr_refresh = 22
  357. Global Const $gui_gr_pensize = 24
  358. Global Const $gui_gr_nobkcolor = -2
  359. Global Const $gui_bkcolor_default = -1
  360. Global Const $gui_bkcolor_transparent = -2
  361. Global Const $gui_bkcolor_lv_alternate = -33554432
  362. Global Const $gui_ws_ex_parentdrag = 1048576
  363. Global Const $lvs_alignleft = 2048
  364. Global Const $lvs_alignmask = 3072
  365. Global Const $lvs_aligntop = 0
  366. Global Const $lvs_autoarrange = 256
  367. Global Const $lvs_default = 13
  368. Global Const $lvs_editlabels = 512
  369. Global Const $lvs_icon = 0
  370. Global Const $lvs_list = 3
  371. Global Const $lvs_nocolumnheader = 16384
  372. Global Const $lvs_nolabelwrap = 128
  373. Global Const $lvs_noscroll = 8192
  374. Global Const $lvs_nosortheader = 32768
  375. Global Const $lvs_ownerdata = 4096
  376. Global Const $lvs_ownerdrawfixed = 1024
  377. Global Const $lvs_report = 1
  378. Global Const $lvs_shareimagelists = 64
  379. Global Const $lvs_showselalways = 8
  380. Global Const $lvs_singlesel = 4
  381. Global Const $lvs_smallicon = 2
  382. Global Const $lvs_sortascending = 16
  383. Global Const $lvs_sortdescending = 32
  384. Global Const $lvs_typemask = 3
  385. Global Const $lvs_typestylemask = 64512
  386. Global Const $lvs_ex_autoautoarrange = 16777216
  387. Global Const $lvs_ex_autocheckselect = 134217728
  388. Global Const $lvs_ex_autosizecolumns = 268435456
  389. Global Const $lvs_ex_borderselect = 32768
  390. Global Const $lvs_ex_checkboxes = 4
  391. Global Const $lvs_ex_columnoverflow = -2147483648
  392. Global Const $lvs_ex_columnsnappoints = 1073741824
  393. Global Const $lvs_ex_doublebuffer = 65536
  394. Global Const $lvs_ex_flatsb = 256
  395. Global Const $lvs_ex_fullrowselect = 32
  396. Global Const $lvs_ex_gridlines = 1
  397. Global Const $lvs_ex_headerdragdrop = 16
  398. Global Const $lvs_ex_headerinallviews = 33554432
  399. Global Const $lvs_ex_hidelabels = 131072
  400. Global Const $lvs_ex_infotip = 1024
  401. Global Const $lvs_ex_justifycolumns = 2097152
  402. Global Const $lvs_ex_labeltip = 16384
  403. Global Const $lvs_ex_multiworkareas = 8192
  404. Global Const $lvs_ex_oneclickactivate = 64
  405. Global Const $lvs_ex_regional = 512
  406. Global Const $lvs_ex_simpleselect = 1048576
  407. Global Const $lvs_ex_snaptogrid = 524288
  408. Global Const $lvs_ex_subitemimages = 2
  409. Global Const $lvs_ex_trackselect = 8
  410. Global Const $lvs_ex_transparentbkgnd = 4194304
  411. Global Const $lvs_ex_transparentshadowtext = 8388608
  412. Global Const $lvs_ex_twoclickactivate = 128
  413. Global Const $lvs_ex_underlinecold = 4096
  414. Global Const $lvs_ex_underlinehot = 2048
  415. Global Const $lvgs_normal = 0
  416. Global Const $lvgs_collapsed = 1
  417. Global Const $lvgs_hidden = 2
  418. Global Const $lvgs_noheader = 4
  419. Global Const $lvgs_collapsible = 8
  420. Global Const $lvgs_focused = 16
  421. Global Const $lvgs_selected = 32
  422. Global Const $lvgs_subseted = 64
  423. Global Const $lvgs_subsetlinkfocused = 128
  424. Global Const $lvggr_group = 0
  425. Global Const $lvggr_header = 1
  426. Global Const $lvggr_label = 2
  427. Global Const $lvggr_subsetlink = 3
  428. Global Const $lv_err = -1
  429. Global Const $lvbkif_source_none = 0
  430. Global Const $lvbkif_source_hbitmap = 1
  431. Global Const $lvbkif_source_url = 2
  432. Global Const $lvbkif_source_mask = 3
  433. Global Const $lvbkif_style_normal = 0
  434. Global Const $lvbkif_style_tile = 16
  435. Global Const $lvbkif_style_mask = 16
  436. Global Const $lvbkif_flag_tileoffset = 256
  437. Global Const $lvbkif_type_watermark = 268435456
  438. Global Const $lv_view_details = 1
  439. Global Const $lv_view_icon = 0
  440. Global Const $lv_view_list = 3
  441. Global Const $lv_view_smallicon = 2
  442. Global Const $lv_view_tile = 4
  443. Global Const $lva_alignleft = 1
  444. Global Const $lva_aligntop = 2
  445. Global Const $lva_default = 0
  446. Global Const $lva_snaptogrid = 5
  447. Global Const $lvcdi_item = 0
  448. Global Const $lvcdi_group = 1
  449. Global Const $lvcf_alldata = 63
  450. Global Const $lvcf_fmt = 1
  451. Global Const $lvcf_image = 16
  452. Global Const $lvcfmt_justifymask = 3
  453. Global Const $lvcf_text = 4
  454. Global Const $lvcf_width = 2
  455. Global Const $lvcfmt_bitmap_on_right = 4096
  456. Global Const $lvcfmt_center = 2
  457. Global Const $lvcfmt_col_has_images = 32768
  458. Global Const $lvcfmt_image = 2048
  459. Global Const $lvcfmt_left = 0
  460. Global Const $lvcfmt_right = 1
  461. Global Const $lvfi_nearestxy = 64
  462. Global Const $lvfi_param = 1
  463. Global Const $lvfi_partial = 8
  464. Global Const $lvfi_string = 2
  465. Global Const $lvfi_wrap = 32
  466. Global Const $lvga_footer_left = 8
  467. Global Const $lvga_footer_center = 16
  468. Global Const $lvga_footer_right = 32
  469. Global Const $lvga_header_left = 1
  470. Global Const $lvga_header_center = 2
  471. Global Const $lvga_header_right = 4
  472. Global Const $lvgf_align = 8
  473. Global Const $lvgf_descriptiontop = 1024
  474. Global Const $lvgf_descriptionbottom = 2048
  475. Global Const $lvgf_extendedimage = 8192
  476. Global Const $lvgf_footer = 2
  477. Global Const $lvgf_groupid = 16
  478. Global Const $lvgf_header = 1
  479. Global Const $lvgf_items = 16384
  480. Global Const $lvgf_none = 0
  481. Global Const $lvgf_state = 4
  482. Global Const $lvgf_subset = 32768
  483. Global Const $lvgf_subsetitems = 65536
  484. Global Const $lvgf_subtitle = 256
  485. Global Const $lvgf_task = 512
  486. Global Const $lvgf_titleimage = 4096
  487. Global Const $lvht_above = 8
  488. Global Const $lvht_below = 16
  489. Global Const $lvht_nowhere = 1
  490. Global Const $lvht_onitemicon = 2
  491. Global Const $lvht_onitemlabel = 4
  492. Global Const $lvht_onitemstateicon = 8
  493. Global Const $lvht_toleft = 64
  494. Global Const $lvht_toright = 32
  495. Global Const $lvht_onitem = BitOR($lvht_onitemicon, $lvht_onitemlabel, $lvht_onitemstateicon)
  496. Global Const $lvif_colfmt = 65536
  497. Global Const $lvif_columns = 512
  498. Global Const $lvif_groupid = 256
  499. Global Const $lvif_image = 2
  500. Global Const $lvif_indent = 16
  501. Global Const $lvif_norecompute = 2048
  502. Global Const $lvif_param = 4
  503. Global Const $lvif_state = 8
  504. Global Const $lvif_text = 1
  505. Global Const $lvim_after = 1
  506. Global Const $lvir_bounds = 0
  507. Global Const $lvir_icon = 1
  508. Global Const $lvir_label = 2
  509. Global Const $lvir_selectbounds = 3
  510. Global Const $lvis_cut = 4
  511. Global Const $lvis_drophilited = 8
  512. Global Const $lvis_focused = 1
  513. Global Const $lvis_overlaymask = 3840
  514. Global Const $lvis_selected = 2
  515. Global Const $lvis_stateimagemask = 61440
  516. Global Const $lvm_first = 4096
  517. Global Const $lvm_approximateviewrect = ($lvm_first + 64)
  518. Global Const $lvm_arrange = ($lvm_first + 22)
  519. Global Const $lvm_canceleditlabel = ($lvm_first + 179)
  520. Global Const $lvm_createdragimage = ($lvm_first + 33)
  521. Global Const $lvm_deleteallitems = ($lvm_first + 9)
  522. Global Const $lvm_deletecolumn = ($lvm_first + 28)
  523. Global Const $lvm_deleteitem = ($lvm_first + 8)
  524. Global Const $lvm_editlabela = ($lvm_first + 23)
  525. Global Const $lvm_editlabelw = ($lvm_first + 118)
  526. Global Const $lvm_editlabel = $lvm_editlabela
  527. Global Const $lvm_enablegroupview = ($lvm_first + 157)
  528. Global Const $lvm_ensurevisible = ($lvm_first + 19)
  529. Global Const $lvm_finditem = ($lvm_first + 13)
  530. Global Const $lvm_getbkcolor = ($lvm_first + 0)
  531. Global Const $lvm_getbkimagea = ($lvm_first + 69)
  532. Global Const $lvm_getbkimagew = ($lvm_first + 139)
  533. Global Const $lvm_getcallbackmask = ($lvm_first + 10)
  534. Global Const $lvm_getcolumna = ($lvm_first + 25)
  535. Global Const $lvm_getcolumnw = ($lvm_first + 95)
  536. Global Const $lvm_getcolumnorderarray = ($lvm_first + 59)
  537. Global Const $lvm_getcolumnwidth = ($lvm_first + 29)
  538. Global Const $lvm_getcountperpage = ($lvm_first + 40)
  539. Global Const $lvm_geteditcontrol = ($lvm_first + 24)
  540. Global Const $lvm_getemptytext = ($lvm_first + 204)
  541. Global Const $lvm_getextendedlistviewstyle = ($lvm_first + 55)
  542. Global Const $lvm_getfocusedgroup = ($lvm_first + 93)
  543. Global Const $lvm_getfooterinfo = ($lvm_first + 206)
  544. Global Const $lvm_getfooteritem = ($lvm_first + 208)
  545. Global Const $lvm_getfooteritemrect = ($lvm_first + 207)
  546. Global Const $lvm_getfooterrect = ($lvm_first + 205)
  547. Global Const $lvm_getgroupcount = ($lvm_first + 152)
  548. Global Const $lvm_getgroupinfo = ($lvm_first + 149)
  549. Global Const $lvm_getgroupinfobyindex = ($lvm_first + 153)
  550. Global Const $lvm_getgroupmetrics = ($lvm_first + 156)
  551. Global Const $lvm_getgrouprect = ($lvm_first + 98)
  552. Global Const $lvm_getgroupstate = ($lvm_first + 92)
  553. Global Const $lvm_getheader = ($lvm_first + 31)
  554. Global Const $lvm_gethotcursor = ($lvm_first + 63)
  555. Global Const $lvm_gethotitem = ($lvm_first + 61)
  556. Global Const $lvm_gethovertime = ($lvm_first + 72)
  557. Global Const $lvm_getimagelist = ($lvm_first + 2)
  558. Global Const $lvm_getinsertmark = ($lvm_first + 167)
  559. Global Const $lvm_getinsertmarkcolor = ($lvm_first + 171)
  560. Global Const $lvm_getinsertmarkrect = ($lvm_first + 169)
  561. Global Const $lvm_getisearchstringa = ($lvm_first + 52)
  562. Global Const $lvm_getisearchstringw = ($lvm_first + 117)
  563. Global Const $lvm_getitema = ($lvm_first + 5)
  564. Global Const $lvm_getitemw = ($lvm_first + 75)
  565. Global Const $lvm_getitemcount = ($lvm_first + 4)
  566. Global Const $lvm_getitemindexrect = ($lvm_first + 209)
  567. Global Const $lvm_getitemposition = ($lvm_first + 16)
  568. Global Const $lvm_getitemrect = ($lvm_first + 14)
  569. Global Const $lvm_getitemspacing = ($lvm_first + 51)
  570. Global Const $lvm_getitemstate = ($lvm_first + 44)
  571. Global Const $lvm_getitemtexta = ($lvm_first + 45)
  572. Global Const $lvm_getitemtextw = ($lvm_first + 115)
  573. Global Const $lvm_getnextitem = ($lvm_first + 12)
  574. Global Const $lvm_getnextitemindex = ($lvm_first + 211)
  575. Global Const $lvm_getnumberofworkareas = ($lvm_first + 73)
  576. Global Const $lvm_getorigin = ($lvm_first + 41)
  577. Global Const $lvm_getoutlinecolor = ($lvm_first + 176)
  578. Global Const $lvm_getselectedcolumn = ($lvm_first + 174)
  579. Global Const $lvm_getselectedcount = ($lvm_first + 50)
  580. Global Const $lvm_getselectionmark = ($lvm_first + 66)
  581. Global Const $lvm_getstringwidtha = ($lvm_first + 17)
  582. Global Const $lvm_getstringwidthw = ($lvm_first + 87)
  583. Global Const $lvm_getsubitemrect = ($lvm_first + 56)
  584. Global Const $lvm_gettextbkcolor = ($lvm_first + 37)
  585. Global Const $lvm_gettextcolor = ($lvm_first + 35)
  586. Global Const $lvm_gettileinfo = ($lvm_first + 165)
  587. Global Const $lvm_gettileviewinfo = ($lvm_first + 163)
  588. Global Const $lvm_gettooltips = ($lvm_first + 78)
  589. Global Const $lvm_gettopindex = ($lvm_first + 39)
  590. Global Const $lvm_getunicodeformat = 8192 + 6
  591. Global Const $lvm_getview = ($lvm_first + 143)
  592. Global Const $lvm_getviewrect = ($lvm_first + 34)
  593. Global Const $lvm_getworkareas = ($lvm_first + 70)
  594. Global Const $lvm_hasgroup = ($lvm_first + 161)
  595. Global Const $lvm_hittest = ($lvm_first + 18)
  596. Global Const $lvm_insertcolumna = ($lvm_first + 27)
  597. Global Const $lvm_insertcolumnw = ($lvm_first + 97)
  598. Global Const $lvm_insertgroup = ($lvm_first + 145)
  599. Global Const $lvm_insertgroupsorted = ($lvm_first + 159)
  600. Global Const $lvm_insertitema = ($lvm_first + 7)
  601. Global Const $lvm_insertitemw = ($lvm_first + 77)
  602. Global Const $lvm_insertmarkhittest = ($lvm_first + 168)
  603. Global Const $lvm_isgroupviewenabled = ($lvm_first + 175)
  604. Global Const $lvm_isitemvisible = ($lvm_first + 182)
  605. Global Const $lvm_mapidtoindex = ($lvm_first + 181)
  606. Global Const $lvm_mapindextoid = ($lvm_first + 180)
  607. Global Const $lvm_movegroup = ($lvm_first + 151)
  608. Global Const $lvm_redrawitems = ($lvm_first + 21)
  609. Global Const $lvm_removeallgroups = ($lvm_first + 160)
  610. Global Const $lvm_removegroup = ($lvm_first + 150)
  611. Global Const $lvm_scroll = ($lvm_first + 20)
  612. Global Const $lvm_setbkcolor = ($lvm_first + 1)
  613. Global Const $lvm_setbkimagea = ($lvm_first + 68)
  614. Global Const $lvm_setbkimagew = ($lvm_first + 138)
  615. Global Const $lvm_setcallbackmask = ($lvm_first + 11)
  616. Global Const $lvm_setcolumna = ($lvm_first + 26)
  617. Global Const $lvm_setcolumnw = ($lvm_first + 96)
  618. Global Const $lvm_setcolumnorderarray = ($lvm_first + 58)
  619. Global Const $lvm_setcolumnwidth = ($lvm_first + 30)
  620. Global Const $lvm_setextendedlistviewstyle = ($lvm_first + 54)
  621. Global Const $lvm_setgroupinfo = ($lvm_first + 147)
  622. Global Const $lvm_setgroupmetrics = ($lvm_first + 155)
  623. Global Const $lvm_sethotcursor = ($lvm_first + 62)
  624. Global Const $lvm_sethotitem = ($lvm_first + 60)
  625. Global Const $lvm_sethovertime = ($lvm_first + 71)
  626. Global Const $lvm_seticonspacing = ($lvm_first + 53)
  627. Global Const $lvm_setimagelist = ($lvm_first + 3)
  628. Global Const $lvm_setinfotip = ($lvm_first + 173)
  629. Global Const $lvm_setinsertmark = ($lvm_first + 166)
  630. Global Const $lvm_setinsertmarkcolor = ($lvm_first + 170)
  631. Global Const $lvm_setitema = ($lvm_first + 6)
  632. Global Const $lvm_setitemw = ($lvm_first + 76)
  633. Global Const $lvm_setitemcount = ($lvm_first + 47)
  634. Global Const $lvm_setitemindexstate = ($lvm_first + 210)
  635. Global Const $lvm_setitemposition = ($lvm_first + 15)
  636. Global Const $lvm_setitemposition32 = ($lvm_first + 49)
  637. Global Const $lvm_setitemstate = ($lvm_first + 43)
  638. Global Const $lvm_setitemtexta = ($lvm_first + 46)
  639. Global Const $lvm_setitemtextw = ($lvm_first + 116)
  640. Global Const $lvm_setoutlinecolor = ($lvm_first + 177)
  641. Global Const $lvm_setselectedcolumn = ($lvm_first + 140)
  642. Global Const $lvm_setselectionmark = ($lvm_first + 67)
  643. Global Const $lvm_settextbkcolor = ($lvm_first + 38)
  644. Global Const $lvm_settextcolor = ($lvm_first + 36)
  645. Global Const $lvm_settileinfo = ($lvm_first + 164)
  646. Global Const $lvm_settileviewinfo = ($lvm_first + 162)
  647. Global Const $lvm_settilewidth = ($lvm_first + 141)
  648. Global Const $lvm_settooltips = ($lvm_first + 74)
  649. Global Const $lvm_setunicodeformat = 8192 + 5
  650. Global Const $lvm_setview = ($lvm_first + 142)
  651. Global Const $lvm_setworkareas = ($lvm_first + 65)
  652. Global Const $lvm_sortgroups = ($lvm_first + 158)
  653. Global Const $lvm_sortitems = ($lvm_first + 48)
  654. Global Const $lvm_sortitemsex = ($lvm_first + 81)
  655. Global Const $lvm_subitemhittest = ($lvm_first + 57)
  656. Global Const $lvm_update = ($lvm_first + 42)
  657. Global Const $lvn_first = -100
  658. Global Const $lvn_last = -199
  659. Global Const $lvn_begindrag = ($lvn_first - 9)
  660. Global Const $lvn_beginlabeledita = ($lvn_first - 5)
  661. Global Const $lvn_beginlabeleditw = ($lvn_first - 75)
  662. Global Const $lvn_beginrdrag = ($lvn_first - 11)
  663. Global Const $lvn_beginscroll = ($lvn_first - 80)
  664. Global Const $lvn_columnclick = ($lvn_first - 8)
  665. Global Const $lvn_columndropdown = ($lvn_first - 64)
  666. Global Const $lvn_columnoverflowclick = ($lvn_first - 66)
  667. Global Const $lvn_deleteallitems = ($lvn_first - 4)
  668. Global Const $lvn_deleteitem = ($lvn_first - 3)
  669. Global Const $lvn_endlabeledita = ($lvn_first - 6)
  670. Global Const $lvn_endlabeleditw = ($lvn_first - 76)
  671. Global Const $lvn_endscroll = ($lvn_first - 81)
  672. Global Const $lvn_getdispinfoa = ($lvn_first - 50)
  673. Global Const $lvn_getdispinfow = ($lvn_first - 77)
  674. Global Const $lvn_getdispinfo = $lvn_getdispinfoa
  675. Global Const $lvn_getemptymarkup = ($lvn_first - 87)
  676. Global Const $lvn_getinfotipa = ($lvn_first - 57)
  677. Global Const $lvn_getinfotipw = ($lvn_first - 58)
  678. Global Const $lvn_hottrack = ($lvn_first - 21)
  679. Global Const $lvn_incrementalsearcha = ($lvn_first - 62)
  680. Global Const $lvn_incrementalsearchw = ($lvn_first - 63)
  681. Global Const $lvn_insertitem = ($lvn_first - 2)
  682. Global Const $lvn_itemactivate = ($lvn_first - 14)
  683. Global Const $lvn_itemchanged = ($lvn_first - 1)
  684. Global Const $lvn_itemchanging = ($lvn_first - 0)
  685. Global Const $lvn_keydown = ($lvn_first - 55)
  686. Global Const $lvn_linkclick = ($lvn_first - 84)
  687. Global Const $lvn_marqueebegin = ($lvn_first - 56)
  688. Global Const $lvn_odcachehint = ($lvn_first - 13)
  689. Global Const $lvn_odfinditema = ($lvn_first - 52)
  690. Global Const $lvn_odfinditemw = ($lvn_first - 79)
  691. Global Const $lvn_odfinditem = $lvn_odfinditema
  692. Global Const $lvn_odstatechanged = ($lvn_first - 15)
  693. Global Const $lvn_setdispinfoa = ($lvn_first - 51)
  694. Global Const $lvn_setdispinfow = ($lvn_first - 78)
  695. Global Const $lvni_above = 256
  696. Global Const $lvni_below = 512
  697. Global Const $lvni_toleft = 1024
  698. Global Const $lvni_toright = 2048
  699. Global Const $lvni_all = 0
  700. Global Const $lvni_cut = 4
  701. Global Const $lvni_drophilited = 8
  702. Global Const $lvni_focused = 1
  703. Global Const $lvni_selected = 2
  704. Global Const $lvscw_autosize = -1
  705. Global Const $lvscw_autosize_useheader = -2
  706. Global Const $lvsicf_noinvalidateall = 1
  707. Global Const $lvsicf_noscroll = 2
  708. Global Const $lvsil_normal = 0
  709. Global Const $lvsil_small = 1
  710. Global Const $lvsil_state = 2
  711. Global Const $gui_ss_default_listview = BitOR($lvs_showselalways, $lvs_singlesel)
  712. Global Const $tbs_autoticks = 1
  713. Global Const $tbs_both = 8
  714. Global Const $tbs_bottom = 0
  715. Global Const $tbs_downisleft = 1024
  716. Global Const $tbs_enableselrange = 32
  717. Global Const $tbs_fixedlength = 64
  718. Global Const $tbs_horz = 0
  719. Global Const $tbs_left = 4
  720. Global Const $tbs_nothumb = 128
  721. Global Const $tbs_noticks = 16
  722. Global Const $tbs_reversed = 512
  723. Global Const $tbs_right = 0
  724. Global Const $tbs_top = 4
  725. Global Const $tbs_tooltips = 256
  726. Global Const $tbs_vert = 2
  727. Global Const $gui_ss_default_slider = $tbs_autoticks
  728. Global Const $tbcd_channel = 3
  729. Global Const $tbcd_thumb = 2
  730. Global Const $tbcd_tics = 1
  731. Global Const $__sliderconstant_wm_user = 1024
  732. Global Const $tbm_clearsel = $__sliderconstant_wm_user + 19
  733. Global Const $tbm_cleartics = $__sliderconstant_wm_user + 9
  734. Global Const $tbm_getbuddy = $__sliderconstant_wm_user + 33
  735. Global Const $tbm_getchannelrect = $__sliderconstant_wm_user + 26
  736. Global Const $tbm_getlinesize = $__sliderconstant_wm_user + 24
  737. Global Const $tbm_getnumtics = $__sliderconstant_wm_user + 16
  738. Global Const $tbm_getpagesize = $__sliderconstant_wm_user + 22
  739. Global Const $tbm_getpos = $__sliderconstant_wm_user
  740. Global Const $tbm_getptics = $__sliderconstant_wm_user + 14
  741. Global Const $tbm_getselend = $__sliderconstant_wm_user + 18
  742. Global Const $tbm_getselstart = $__sliderconstant_wm_user + 17
  743. Global Const $tbm_getrangemax = $__sliderconstant_wm_user + 2
  744. Global Const $tbm_getrangemin = $__sliderconstant_wm_user + 1
  745. Global Const $tbm_getthumblength = $__sliderconstant_wm_user + 28
  746. Global Const $tbm_getthumbrect = $__sliderconstant_wm_user + 25
  747. Global Const $tbm_gettic = $__sliderconstant_wm_user + 3
  748. Global Const $tbm_getticpos = $__sliderconstant_wm_user + 15
  749. Global Const $tbm_gettooltips = $__sliderconstant_wm_user + 30
  750. Global Const $tbm_getunicodeformat = 8192 + 6
  751. Global Const $tbm_setbuddy = $__sliderconstant_wm_user + 32
  752. Global Const $tbm_setlinesize = $__sliderconstant_wm_user + 23
  753. Global Const $tbm_setpagesize = $__sliderconstant_wm_user + 21
  754. Global Const $tbm_setpos = $__sliderconstant_wm_user + 5
  755. Global Const $tbm_setrange = $__sliderconstant_wm_user + 6
  756. Global Const $tbm_setrangemax = $__sliderconstant_wm_user + 8
  757. Global Const $tbm_setrangemin = $__sliderconstant_wm_user + 7
  758. Global Const $tbm_setsel = $__sliderconstant_wm_user + 10
  759. Global Const $tbm_setselend = $__sliderconstant_wm_user + 12
  760. Global Const $tbm_setselstart = $__sliderconstant_wm_user + 11
  761. Global Const $tbm_setthumblength = $__sliderconstant_wm_user + 27
  762. Global Const $tbm_settic = $__sliderconstant_wm_user + 4
  763. Global Const $tbm_setticfreq = $__sliderconstant_wm_user + 20
  764. Global Const $tbm_settipside = $__sliderconstant_wm_user + 31
  765. Global Const $tbm_settooltips = $__sliderconstant_wm_user + 29
  766. Global Const $tbm_setunicodeformat = 8192 + 5
  767. Global Const $tbts_bottom = 2
  768. Global Const $tbts_left = 1
  769. Global Const $tbts_right = 3
  770. Global Const $tbts_top = 0
  771. Global Const $ss_left = 0
  772. Global Const $ss_center = 1
  773. Global Const $ss_right = 2
  774. Global Const $ss_icon = 3
  775. Global Const $ss_blackrect = 4
  776. Global Const $ss_grayrect = 5
  777. Global Const $ss_whiterect = 6
  778. Global Const $ss_blackframe = 7
  779. Global Const $ss_grayframe = 8
  780. Global Const $ss_whiteframe = 9
  781. Global Const $ss_simple = 11
  782. Global Const $ss_leftnowordwrap = 12
  783. Global Const $ss_bitmap = 14
  784. Global Const $ss_etchedhorz = 16
  785. Global Const $ss_etchedvert = 17
  786. Global Const $ss_etchedframe = 18
  787. Global Const $ss_noprefix = 128
  788. Global Const $ss_notify = 256
  789. Global Const $ss_centerimage = 512
  790. Global Const $ss_rightjust = 1024
  791. Global Const $ss_sunken = 4096
  792. Global Const $gui_ss_default_label = 0
  793. Global Const $gui_ss_default_graphic = 0
  794. Global Const $gui_ss_default_icon = $ss_notify
  795. Global Const $gui_ss_default_pic = $ss_notify
  796. Global Const $tcs_bottom = 2
  797. Global Const $tcs_buttons = 256
  798. Global Const $tcs_fixedwidth = 1024
  799. Global Const $tcs_flatbuttons = 8
  800. Global Const $tcs_focusnever = 32768
  801. Global Const $tcs_focusonbuttondown = 4096
  802. Global Const $tcs_forceiconleft = 16
  803. Global Const $tcs_forcelabelleft = 32
  804. Global Const $tcs_hottrack = 64
  805. Global Const $tcs_multiline = 512
  806. Global Const $tcs_multiselect = 4
  807. Global Const $tcs_ownerdrawfixed = 8192
  808. Global Const $tcs_raggedright = 2048
  809. Global Const $tcs_right = 2
  810. Global Const $tcs_rightjustify = 0
  811. Global Const $tcs_scrollopposite = 1
  812. Global Const $tcs_singleline = 0
  813. Global Const $tcs_tabs = 0
  814. Global Const $tcs_tooltips = 16384
  815. Global Const $tcs_vertical = 128
  816. Global Const $tcs_ex_flatseparators = 1
  817. Global Const $tcs_ex_registerdrop = 2
  818. Global Const $tcht_nowhere = 1
  819. Global Const $tcht_onitemicon = 2
  820. Global Const $tcht_onitemlabel = 4
  821. Global Const $tcht_onitem = 6
  822. Global Const $tcif_text = 1
  823. Global Const $tcif_image = 2
  824. Global Const $tcif_rtlreading = 4
  825. Global Const $tcif_param = 8
  826. Global Const $tcif_state = 16
  827. Global Const $tcif_alldata = 27
  828. Global Const $tcis_buttonpressed = 1
  829. Global Const $tcis_highlighted = 2
  830. Global Const $tc_err = -1
  831. Global Const $gui_ss_default_tab = 0
  832. Global Const $tcm_first = 4864
  833. Global Const $tccm_first = 8192
  834. Global Const $tcm_adjustrect = ($tcm_first + 40)
  835. Global Const $tcm_deleteallitems = ($tcm_first + 9)
  836. Global Const $tcm_deleteitem = ($tcm_first + 8)
  837. Global Const $tcm_deselectall = ($tcm_first + 50)
  838. Global Const $tcm_getcurfocus = ($tcm_first + 47)
  839. Global Const $tcm_getcursel = ($tcm_first + 11)
  840. Global Const $tcm_getextendedstyle = ($tcm_first + 53)
  841. Global Const $tcm_getimagelist = ($tcm_first + 2)
  842. Global Const $tcm_getitema = ($tcm_first + 5)
  843. Global Const $tcm_getitemw = ($tcm_first + 60)
  844. Global Const $tcm_getitemcount = ($tcm_first + 4)
  845. Global Const $tcm_getitemrect = ($tcm_first + 10)
  846. Global Const $tcm_getrowcount = ($tcm_first + 44)
  847. Global Const $tcm_gettooltips = ($tcm_first + 45)
  848. Global Const $tccm_getunicodeformat = ($tccm_first + 6)
  849. Global Const $tcm_getunicodeformat = $tccm_getunicodeformat
  850. Global Const $tcm_highlightitem = ($tcm_first + 51)
  851. Global Const $tcm_hittest = ($tcm_first + 13)
  852. Global Const $tcm_insertitema = ($tcm_first + 7)
  853. Global Const $tcm_insertitemw = ($tcm_first + 62)
  854. Global Const $tcm_removeimage = ($tcm_first + 42)
  855. Global Const $tcm_setitema = ($tcm_first + 6)
  856. Global Const $tcm_setitemw = ($tcm_first + 61)
  857. Global Const $tcm_setitemextra = ($tcm_first + 14)
  858. Global Const $tcm_setitemsize = $tcm_first + 41
  859. Global Const $tcm_setcurfocus = ($tcm_first + 48)
  860. Global Const $tcm_setcursel = ($tcm_first + 12)
  861. Global Const $tcm_setextendedstyle = ($tcm_first + 52)
  862. Global Const $tcm_setimagelist = $tcm_first + 3
  863. Global Const $tcm_setmintabwidth = ($tcm_first + 49)
  864. Global Const $tcm_setpadding = ($tcm_first + 43)
  865. Global Const $tcm_settooltips = ($tcm_first + 46)
  866. Global Const $tccm_setunicodeformat = ($tccm_first + 5)
  867. Global Const $tcm_setunicodeformat = $tccm_setunicodeformat
  868. Global Const $tcn_first = -550
  869. Global Const $tcn_focuschange = ($tcn_first - 4)
  870. Global Const $tcn_getobject = ($tcn_first - 3)
  871. Global Const $tcn_keydown = ($tcn_first - 0)
  872. Global Const $tcn_selchange = ($tcn_first - 1)
  873. Global Const $tcn_selchanging = ($tcn_first - 2)
  874. Global Const $ws_tiled = 0
  875. Global Const $ws_overlapped = 0
  876. Global Const $ws_maximizebox = 65536
  877. Global Const $ws_minimizebox = 131072
  878. Global Const $ws_tabstop = 65536
  879. Global Const $ws_group = 131072
  880. Global Const $ws_sizebox = 262144
  881. Global Const $ws_thickframe = 262144
  882. Global Const $ws_sysmenu = 524288
  883. Global Const $ws_hscroll = 1048576
  884. Global Const $ws_vscroll = 2097152
  885. Global Const $ws_dlgframe = 4194304
  886. Global Const $ws_border = 8388608
  887. Global Const $ws_caption = 12582912
  888. Global Const $ws_overlappedwindow = 13565952
  889. Global Const $ws_tiledwindow = 13565952
  890. Global Const $ws_maximize = 16777216
  891. Global Const $ws_clipchildren = 33554432
  892. Global Const $ws_clipsiblings = 67108864
  893. Global Const $ws_disabled = 134217728
  894. Global Const $ws_visible = 268435456
  895. Global Const $ws_minimize = 536870912
  896. Global Const $ws_child = 1073741824
  897. Global Const $ws_popup = -2147483648
  898. Global Const $ws_popupwindow = -2138570752
  899. Global Const $ds_modalframe = 128
  900. Global Const $ds_setforeground = 512
  901. Global Const $ds_contexthelp = 8192
  902. Global Const $ws_ex_acceptfiles = 16
  903. Global Const $ws_ex_mdichild = 64
  904. Global Const $ws_ex_appwindow = 262144
  905. Global Const $ws_ex_composited = 33554432
  906. Global Const $ws_ex_edge = 512
  907. Global Const $ws_ex_contexthelp = 1024
  908. Global Const $ws_ex_dlgmodalframe = 1
  909. Global Const $ws_ex_leftscrollbar = 16384
  910. Global Const $ws_ex_overlappedwindow = 768
  911. Global Const $ws_ex_right = 4096
  912. Global Const $ws_ex_staticedge = 131072
  913. Global Const $ws_ex_toolwindow = 128
  914. Global Const $ws_ex_topmost = 8
  915. Global Const $ws_ex_transparent = 32
  916. Global Const $ws_ex_windowedge = 256
  917. Global Const $ws_ex_layered = 524288
  918. Global Const $ws_ex_controlparent = 65536
  919. Global Const $ws_ex_layoutrtl = 4194304
  920. Global Const $ws_ex_rtlreading = 8192
  921. Global Const $wm_gettextlength = 14
  922. Global Const $wm_gettext = 13
  923. Global Const $wm_size = 5
  924. Global Const $wm_sizing = 532
  925. Global Const $wm_user = 1024
  926. Global Const $wm_create = 1
  927. Global Const $wm_destroy = 2
  928. Global Const $wm_move = 3
  929. Global Const $wm_activate = 6
  930. Global Const $wm_setfocus = 7
  931. Global Const $wm_killfocus = 8
  932. Global Const $wm_enable = 10
  933. Global Const $wm_setredraw = 11
  934. Global Const $wm_settext = 12
  935. Global Const $wm_paint = 15
  936. Global Const $wm_close = 16
  937. Global Const $wm_quit = 18
  938. Global Const $wm_erasebkgnd = 20
  939. Global Const $wm_syscolorchange = 21
  940. Global Const $wm_showwindow = 24
  941. Global Const $wm_wininichange = 26
  942. Global Const $wm_devmodechange = 27
  943. Global Const $wm_activateapp = 28
  944. Global Const $wm_fontchange = 29
  945. Global Const $wm_timechange = 30
  946. Global Const $wm_cancelmode = 31
  947. Global Const $wm_setcursor = 32
  948. Global Const $wm_mouseactivate = 33
  949. Global Const $wm_childactivate = 34
  950. Global Const $wm_queuesync = 35
  951. Global Const $wm_getminmaxinfo = 36
  952. Global Const $wm_painticon = 38
  953. Global Const $wm_iconerasebkgnd = 39
  954. Global Const $wm_nextdlgctl = 40
  955. Global Const $wm_spoolerstatus = 42
  956. Global Const $wm_drawitem = 43
  957. Global Const $wm_measureitem = 44
  958. Global Const $wm_deleteitem = 45
  959. Global Const $wm_vkeytoitem = 46
  960. Global Const $wm_chartoitem = 47
  961. Global Const $wm_setfont = 48
  962. Global Const $wm_getfont = 49
  963. Global Const $wm_sethotkey = 50
  964. Global Const $wm_gethotkey = 51
  965. Global Const $wm_querydragicon = 55
  966. Global Const $wm_compareitem = 57
  967. Global Const $wm_getobject = 61
  968. Global Const $wm_compacting = 65
  969. Global Const $wm_commnotify = 68
  970. Global Const $wm_windowposchanging = 70
  971. Global Const $wm_windowposchanged = 71
  972. Global Const $wm_power = 72
  973. Global Const $wm_notify = 78
  974. Global Const $wm_copydata = 74
  975. Global Const $wm_canceljournal = 75
  976. Global Const $wm_inputlangchangerequest = 80
  977. Global Const $wm_inputlangchange = 81
  978. Global Const $wm_tcard = 82
  979. Global Const $wm_help = 83
  980. Global Const $wm_userchanged = 84
  981. Global Const $wm_notifyformat = 85
  982. Global Const $wm_cut = 768
  983. Global Const $wm_copy = 769
  984. Global Const $wm_paste = 770
  985. Global Const $wm_clear = 771
  986. Global Const $wm_undo = 772
  987. Global Const $wm_contextmenu = 123
  988. Global Const $wm_stylechanging = 124
  989. Global Const $wm_stylechanged = 125
  990. Global Const $wm_displaychange = 126
  991. Global Const $wm_geticon = 127
  992. Global Const $wm_seticon = 128
  993. Global Const $wm_nccreate = 129
  994. Global Const $wm_ncdestroy = 130
  995. Global Const $wm_nccalcsize = 131
  996. Global Const $wm_nchittest = 132
  997. Global Const $wm_ncpaint = 133
  998. Global Const $wm_ncactivate = 134
  999. Global Const $wm_getdlgcode = 135
  1000. Global Const $wm_syncpaint = 136
  1001. Global Const $wm_ncmousemove = 160
  1002. Global Const $wm_nclbuttondown = 161
  1003. Global Const $wm_nclbuttonup = 162
  1004. Global Const $wm_nclbuttondblclk = 163
  1005. Global Const $wm_ncrbuttondown = 164
  1006. Global Const $wm_ncrbuttonup = 165
  1007. Global Const $wm_ncrbuttondblclk = 166
  1008. Global Const $wm_ncmbuttondown = 167
  1009. Global Const $wm_ncmbuttonup = 168
  1010. Global Const $wm_ncmbuttondblclk = 169
  1011. Global Const $wm_keydown = 256
  1012. Global Const $wm_keyup = 257
  1013. Global Const $wm_char = 258
  1014. Global Const $wm_deadchar = 259
  1015. Global Const $wm_syskeydown = 260
  1016. Global Const $wm_syskeyup = 261
  1017. Global Const $wm_syschar = 262
  1018. Global Const $wm_sysdeadchar = 263
  1019. Global Const $wm_initdialog = 272
  1020. Global Const $wm_command = 273
  1021. Global Const $wm_syscommand = 274
  1022. Global Const $wm_timer = 275
  1023. Global Const $wm_hscroll = 276
  1024. Global Const $wm_vscroll = 277
  1025. Global Const $wm_initmenu = 278
  1026. Global Const $wm_initmenupopup = 279
  1027. Global Const $wm_menuselect = 287
  1028. Global Const $wm_menuchar = 288
  1029. Global Const $wm_enteridle = 289
  1030. Global Const $wm_menurbuttonup = 290
  1031. Global Const $wm_menudrag = 291
  1032. Global Const $wm_menugetobject = 292
  1033. Global Const $wm_uninitmenupopup = 293
  1034. Global Const $wm_menucommand = 294
  1035. Global Const $wm_changeuistate = 295
  1036. Global Const $wm_updateuistate = 296
  1037. Global Const $wm_queryuistate = 297
  1038. Global Const $wm_ctlcolormsgbox = 306
  1039. Global Const $wm_ctlcoloredit = 307
  1040. Global Const $wm_ctlcolorlistbox = 308
  1041. Global Const $wm_ctlcolorbtn = 309
  1042. Global Const $wm_ctlcolordlg = 310
  1043. Global Const $wm_ctlcolorscrollbar = 311
  1044. Global Const $wm_ctlcolorstatic = 312
  1045. Global Const $wm_ctlcolor = 25
  1046. Global Const $mn_gethmenu = 481
  1047. Global Const $nm_first = 0
  1048. Global Const $nm_outofmemory = $nm_first - 1
  1049. Global Const $nm_click = $nm_first - 2
  1050. Global Const $nm_dblclk = $nm_first - 3
  1051. Global Const $nm_return = $nm_first - 4
  1052. Global Const $nm_rclick = $nm_first - 5
  1053. Global Const $nm_rdblclk = $nm_first - 6
  1054. Global Const $nm_setfocus = $nm_first - 7
  1055. Global Const $nm_killfocus = $nm_first - 8
  1056. Global Const $nm_customdraw = $nm_first - 12
  1057. Global Const $nm_hover = $nm_first - 13
  1058. Global Const $nm_nchittest = $nm_first - 14
  1059. Global Const $nm_keydown = $nm_first - 15
  1060. Global Const $nm_releasedcapture = $nm_first - 16
  1061. Global Const $nm_setcursor = $nm_first - 17
  1062. Global Const $nm_char = $nm_first - 18
  1063. Global Const $nm_tooltipscreated = $nm_first - 19
  1064. Global Const $nm_ldown = $nm_first - 20
  1065. Global Const $nm_rdown = $nm_first - 21
  1066. Global Const $nm_themechanged = $nm_first - 22
  1067. Global Const $wm_mousemove = 512
  1068. Global Const $wm_lbuttondown = 513
  1069. Global Const $wm_lbuttonup = 514
  1070. Global Const $wm_lbuttondblclk = 515
  1071. Global Const $wm_rbuttondown = 516
  1072. Global Const $wm_rbuttonup = 517
  1073. Global Const $wm_rbuttondblck = 518
  1074. Global Const $wm_mbuttondown = 519
  1075. Global Const $wm_mbuttonup = 520
  1076. Global Const $wm_mbuttondblck = 521
  1077. Global Const $wm_mousewheel = 522
  1078. Global Const $wm_xbuttondown = 523
  1079. Global Const $wm_xbuttonup = 524
  1080. Global Const $wm_xbuttondblclk = 525
  1081. Global Const $wm_mousehwheel = 526
  1082. Global Const $ps_solid = 0
  1083. Global Const $ps_dash = 1
  1084. Global Const $ps_dot = 2
  1085. Global Const $ps_dashdot = 3
  1086. Global Const $ps_dashdotdot = 4
  1087. Global Const $ps_null = 5
  1088. Global Const $ps_insideframe = 6
  1089. Global Const $lwa_alpha = 2
  1090. Global Const $lwa_colorkey = 1
  1091. Global Const $rgn_and = 1
  1092. Global Const $rgn_or = 2
  1093. Global Const $rgn_xor = 3
  1094. Global Const $rgn_diff = 4
  1095. Global Const $rgn_copy = 5
  1096. Global Const $errorregion = 0
  1097. Global Const $nullregion = 1
  1098. Global Const $simpleregion = 2
  1099. Global Const $complexregion = 3
  1100. Global Const $transparent = 1
  1101. Global Const $opaque = 2
  1102. Global Const $ccm_first = 8192
  1103. Global Const $ccm_getunicodeformat = ($ccm_first + 6)
  1104. Global Const $ccm_setunicodeformat = ($ccm_first + 5)
  1105. Global Const $ccm_setbkcolor = $ccm_first + 1
  1106. Global Const $ccm_setcolorscheme = $ccm_first + 2
  1107. Global Const $ccm_getcolorscheme = $ccm_first + 3
  1108. Global Const $ccm_getdroptarget = $ccm_first + 4
  1109. Global Const $ccm_setwindowtheme = $ccm_first + 11
  1110. Global Const $ga_parent = 1
  1111. Global Const $ga_root = 2
  1112. Global Const $ga_rootowner = 3
  1113. Global Const $sm_cxscreen = 0
  1114. Global Const $sm_cyscreen = 1
  1115. Global Const $sm_cxvscroll = 2
  1116. Global Const $sm_cyhscroll = 3
  1117. Global Const $sm_cycaption = 4
  1118. Global Const $sm_cxborder = 5
  1119. Global Const $sm_cyborder = 6
  1120. Global Const $sm_cxdlgframe = 7
  1121. Global Const $sm_cydlgframe = 8
  1122. Global Const $sm_cyvthumb = 9
  1123. Global Const $sm_cxhthumb = 10
  1124. Global Const $sm_cxicon = 11
  1125. Global Const $sm_cyicon = 12
  1126. Global Const $sm_cxcursor = 13
  1127. Global Const $sm_cycursor = 14
  1128. Global Const $sm_cymenu = 15
  1129. Global Const $sm_cxfullscreen = 16
  1130. Global Const $sm_cyfullscreen = 17
  1131. Global Const $sm_cykanjiwindow = 18
  1132. Global Const $sm_mousepresent = 19
  1133. Global Const $sm_cyvscroll = 20
  1134. Global Const $sm_cxhscroll = 21
  1135. Global Const $sm_debug = 22
  1136. Global Const $sm_swapbutton = 23
  1137. Global Const $sm_reserved1 = 24
  1138. Global Const $sm_reserved2 = 25
  1139. Global Const $sm_reserved3 = 26
  1140. Global Const $sm_reserved4 = 27
  1141. Global Const $sm_cxmin = 28
  1142. Global Const $sm_cymin = 29
  1143. Global Const $sm_cxsize = 30
  1144. Global Const $sm_cysize = 31
  1145. Global Const $sm_cxframe = 32
  1146. Global Const $sm_cyframe = 33
  1147. Global Const $sm_cxmintrack = 34
  1148. Global Const $sm_cymintrack = 35
  1149. Global Const $sm_cxdoubleclk = 36
  1150. Global Const $sm_cydoubleclk = 37
  1151. Global Const $sm_cxiconspacing = 38
  1152. Global Const $sm_cyiconspacing = 39
  1153. Global Const $sm_menudropalignment = 40
  1154. Global Const $sm_penwindows = 41
  1155. Global Const $sm_dbcsenabled = 42
  1156. Global Const $sm_cmousebuttons = 43
  1157. Global Const $sm_secure = 44
  1158. Global Const $sm_cxedge = 45
  1159. Global Const $sm_cyedge = 46
  1160. Global Const $sm_cxminspacing = 47
  1161. Global Const $sm_cyminspacing = 48
  1162. Global Const $sm_cxsmicon = 49
  1163. Global Const $sm_cysmicon = 50
  1164. Global Const $sm_cysmcaption = 51
  1165. Global Const $sm_cxsmsize = 52
  1166. Global Const $sm_cysmsize = 53
  1167. Global Const $sm_cxmenusize = 54
  1168. Global Const $sm_cymenusize = 55
  1169. Global Const $sm_arrange = 56
  1170. Global Const $sm_cxminimized = 57
  1171. Global Const $sm_cyminimized = 58
  1172. Global Const $sm_cxmaxtrack = 59
  1173. Global Const $sm_cymaxtrack = 60
  1174. Global Const $sm_cxmaximized = 61
  1175. Global Const $sm_cymaximized = 62
  1176. Global Const $sm_network = 63
  1177. Global Const $sm_cleanboot = 67
  1178. Global Const $sm_cxdrag = 68
  1179. Global Const $sm_cydrag = 69
  1180. Global Const $sm_showsounds = 70
  1181. Global Const $sm_cxmenucheck = 71
  1182. Global Const $sm_cymenucheck = 72
  1183. Global Const $sm_slowmachine = 73
  1184. Global Const $sm_mideastenabled = 74
  1185. Global Const $sm_mousewheelpresent = 75
  1186. Global Const $sm_xvirtualscreen = 76
  1187. Global Const $sm_yvirtualscreen = 77
  1188. Global Const $sm_cxvirtualscreen = 78
  1189. Global Const $sm_cyvirtualscreen = 79
  1190. Global Const $sm_cmonitors = 80
  1191. Global Const $sm_samedisplayformat = 81
  1192. Global Const $sm_immenabled = 82
  1193. Global Const $sm_cxfocusborder = 83
  1194. Global Const $sm_cyfocusborder = 84
  1195. Global Const $sm_tabletpc = 86
  1196. Global Const $sm_mediacenter = 87
  1197. Global Const $sm_starter = 88
  1198. Global Const $sm_serverr2 = 89
  1199. Global Const $sm_cmetrics = 90
  1200. Global Const $sm_remotesession = 4096
  1201. Global Const $sm_shuttingdown = 8192
  1202. Global Const $sm_remotecontrol = 8193
  1203. Global Const $sm_caretblinkingenabled = 8194
  1204. Global Const $blackness = 66
  1205. Global Const $captureblt = 1073741824
  1206. Global Const $dstinvert = 5570569
  1207. Global Const $mergecopy = 12583114
  1208. Global Const $mergepaint = 12255782
  1209. Global Const $nomirrorbitmap = -2147483648
  1210. Global Const $notsrccopy = 3342344
  1211. Global Const $notsrcerase = 1114278
  1212. Global Const $patcopy = 15728673
  1213. Global Const $patinvert = 5898313
  1214. Global Const $patpaint = 16452105
  1215. Global Const $srcand = 8913094
  1216. Global Const $srccopy = 13369376
  1217. Global Const $srcerase = 4457256
  1218. Global Const $srcinvert = 6684742
  1219. Global Const $srcpaint = 15597702
  1220. Global Const $whiteness = 16711778
  1221. Global Const $dt_bottom = 8
  1222. Global Const $dt_calcrect = 1024
  1223. Global Const $dt_center = 1
  1224. Global Const $dt_editcontrol = 8192
  1225. Global Const $dt_end_ellipsis = 32768
  1226. Global Const $dt_expandtabs = 64
  1227. Global Const $dt_externalleading = 512
  1228. Global Const $dt_hideprefix = 1048576
  1229. Global Const $dt_internal = 4096
  1230. Global Const $dt_left = 0
  1231. Global Const $dt_modifystring = 65536
  1232. Global Const $dt_noclip = 256
  1233. Global Const $dt_nofullwidthcharbreak = 524288
  1234. Global Const $dt_noprefix = 2048
  1235. Global Const $dt_path_ellipsis = 16384
  1236. Global Const $dt_prefixonly = 2097152
  1237. Global Const $dt_right = 2
  1238. Global Const $dt_rtlreading = 131072
  1239. Global Const $dt_singleline = 32
  1240. Global Const $dt_tabstop = 128
  1241. Global Const $dt_top = 0
  1242. Global Const $dt_vcenter = 4
  1243. Global Const $dt_wordbreak = 16
  1244. Global Const $dt_word_ellipsis = 262144
  1245. Global Const $rdw_erase = 4
  1246. Global Const $rdw_frame = 1024
  1247. Global Const $rdw_internalpaint = 2
  1248. Global Const $rdw_invalidate = 1
  1249. Global Const $rdw_noerase = 32
  1250. Global Const $rdw_noframe = 2048
  1251. Global Const $rdw_nointernalpaint = 16
  1252. Global Const $rdw_validate = 8
  1253. Global Const $rdw_erasenow = 512
  1254. Global Const $rdw_updatenow = 256
  1255. Global Const $rdw_allchildren = 128
  1256. Global Const $rdw_nochildren = 64
  1257. Global Const $wm_renderformat = 773
  1258. Global Const $wm_renderallformats = 774
  1259. Global Const $wm_destroyclipboard = 775
  1260. Global Const $wm_drawclipboard = 776
  1261. Global Const $wm_paintclipboard = 777
  1262. Global Const $wm_vscrollclipboard = 778
  1263. Global Const $wm_sizeclipboard = 779
  1264. Global Const $wm_askcbformatname = 780
  1265. Global Const $wm_changecbchain = 781
  1266. Global Const $wm_hscrollclipboard = 782
  1267. Global Const $hterror = -2
  1268. Global Const $httransparent = -1
  1269. Global Const $htnowhere = 0
  1270. Global Const $htclient = 1
  1271. Global Const $htcaption = 2
  1272. Global Const $htsysmenu = 3
  1273. Global Const $htgrowbox = 4
  1274. Global Const $htsize = $htgrowbox
  1275. Global Const $htmenu = 5
  1276. Global Const $hthscroll = 6
  1277. Global Const $htvscroll = 7
  1278. Global Const $htminbutton = 8
  1279. Global Const $htmaxbutton = 9
  1280. Global Const $htleft = 10
  1281. Global Const $htright = 11
  1282. Global Const $httop = 12
  1283. Global Const $httopleft = 13
  1284. Global Const $httopright = 14
  1285. Global Const $htbottom = 15
  1286. Global Const $htbottomleft = 16
  1287. Global Const $htbottomright = 17
  1288. Global Const $htborder = 18
  1289. Global Const $htreduce = $htminbutton
  1290. Global Const $htzoom = $htmaxbutton
  1291. Global Const $htsizefirst = $htleft
  1292. Global Const $htsizelast = $htbottomright
  1293. Global Const $htobject = 19
  1294. Global Const $htclose = 20
  1295. Global Const $hthelp = 21
  1296. Global Const $color_scrollbar = 0
  1297. Global Const $color_background = 1
  1298. Global Const $color_activecaption = 2
  1299. Global Const $color_inactivecaption = 3
  1300. Global Const $color_menu = 4
  1301. Global Const $color_window = 5
  1302. Global Const $color_windowframe = 6
  1303. Global Const $color_menutext = 7
  1304. Global Const $color_windowtext = 8
  1305. Global Const $color_captiontext = 9
  1306. Global Const $color_activeborder = 10
  1307. Global Const $color_inactiveborder = 11
  1308. Global Const $color_appworkspace = 12
  1309. Global Const $color_highlight = 13
  1310. Global Const $color_highlighttext = 14
  1311. Global Const $color_btnface = 15
  1312. Global Const $color_btnshadow = 16
  1313. Global Const $color_graytext = 17
  1314. Global Const $color_btntext = 18
  1315. Global Const $color_inactivecaptiontext = 19
  1316. Global Const $color_btnhighlight = 20
  1317. Global Const $color_3ddkshadow = 21
  1318. Global Const $color_3dlight = 22
  1319. Global Const $color_infotext = 23
  1320. Global Const $color_infobk = 24
  1321. Global Const $color_hotlight = 26
  1322. Global Const $color_gradientactivecaption = 27
  1323. Global Const $color_gradientinactivecaption = 28
  1324. Global Const $color_menuhilight = 29
  1325. Global Const $color_menubar = 30
  1326. Global Const $color_desktop = 1
  1327. Global Const $color_3dface = 15
  1328. Global Const $color_3dshadow = 16
  1329. Global Const $color_3dhighlight = 20
  1330. Global Const $color_3dhilight = 20
  1331. Global Const $color_btnhilight = 20
  1332. Global Const $hinst_commctrl = -1
  1333. Global Const $idb_std_small_color = 0
  1334. Global Const $idb_std_large_color = 1
  1335. Global Const $idb_view_small_color = 4
  1336. Global Const $idb_view_large_color = 5
  1337. Global Const $idb_hist_small_color = 8
  1338. Global Const $idb_hist_large_color = 9
  1339. Global Const $startf_forceofffeedback = 128
  1340. Global Const $startf_forceonfeedback = 64
  1341. Global Const $startf_runfullscreen = 32
  1342. Global Const $startf_usecountchars = 8
  1343. Global Const $startf_usefillattribute = 16
  1344. Global Const $startf_usehotkey = 512
  1345. Global Const $startf_useposition = 4
  1346. Global Const $startf_useshowwindow = 1
  1347. Global Const $startf_usesize = 2
  1348. Global Const $startf_usestdhandles = 256
  1349. Global Const $cdds_prepaint = 1
  1350. Global Const $cdds_postpaint = 2
  1351. Global Const $cdds_preerase = 3
  1352. Global Const $cdds_posterase = 4
  1353. Global Const $cdds_item = 65536
  1354. Global Const $cdds_itemprepaint = 65537
  1355. Global Const $cdds_itempostpaint = 65538
  1356. Global Const $cdds_itempreerase = 65539
  1357. Global Const $cdds_itemposterase = 65540
  1358. Global Const $cdds_subitem = 131072
  1359. Global Const $cdis_selected = 1
  1360. Global Const $cdis_grayed = 2
  1361. Global Const $cdis_disabled = 4
  1362. Global Const $cdis_checked = 8
  1363. Global Const $cdis_focus = 16
  1364. Global Const $cdis_default = 32
  1365. Global Const $cdis_hot = 64
  1366. Global Const $cdis_marked = 128
  1367. Global Const $cdis_indeterminate = 256
  1368. Global Const $cdis_showkeyboardcues = 512
  1369. Global Const $cdis_nearhot = 1024
  1370. Global Const $cdis_othersidehot = 2048
  1371. Global Const $cdis_drophilited = 4096
  1372. Global Const $cdrf_dodefault = 0
  1373. Global Const $cdrf_newfont = 2
  1374. Global Const $cdrf_skipdefault = 4
  1375. Global Const $cdrf_notifypostpaint = 16
  1376. Global Const $cdrf_notifyitemdraw = 32
  1377. Global Const $cdrf_notifysubitemdraw = 32
  1378. Global Const $cdrf_notifyposterase = 64
  1379. Global Const $cdrf_doerase = 8
  1380. Global Const $cdrf_skippostpaint = 256
  1381. Global Const $gui_ss_default_gui = BitOR($ws_minimizebox, $ws_caption, $ws_popup, $ws_sysmenu)
  1382. Global Const $fw_dontcare = 0
  1383. Global Const $fw_thin = 100
  1384. Global Const $fw_extralight = 200
  1385. Global Const $fw_ultralight = 200
  1386. Global Const $fw_light = 300
  1387. Global Const $fw_normal = 400
  1388. Global Const $fw_regular = 400
  1389. Global Const $fw_medium = 500
  1390. Global Const $fw_semibold = 600
  1391. Global Const $fw_demibold = 600
  1392. Global Const $fw_bold = 700
  1393. Global Const $fw_extrabold = 800
  1394. Global Const $fw_ultrabold = 800
  1395. Global Const $fw_heavy = 900
  1396. Global Const $fw_black = 900
  1397. Global Const $cf_effects = 256
  1398. Global Const $cf_printerfonts = 2
  1399. Global Const $cf_screenfonts = 1
  1400. Global Const $cf_noscriptsel = 8388608
  1401. Global Const $cf_inittologfontstruct = 64
  1402. Global Const $logpixelsx = 88
  1403. Global Const $logpixelsy = 90
  1404. Global Const $ansi_charset = 0
  1405. Global Const $baltic_charset = 186
  1406. Global Const $chinesebig5_charset = 136
  1407. Global Const $default_charset = 1
  1408. Global Const $easteurope_charset = 238
  1409. Global Const $gb2312_charset = 134
  1410. Global Const $greek_charset = 161
  1411. Global Const $hangeul_charset = 129
  1412. Global Const $mac_charset = 77
  1413. Global Const $oem_charset = 255
  1414. Global Const $russian_charset = 204
  1415. Global Const $shiftjis_charset = 128
  1416. Global Const $symbol_charset = 2
  1417. Global Const $turkish_charset = 162
  1418. Global Const $vietnamese_charset = 163
  1419. Global Const $out_character_precis = 2
  1420. Global Const $out_default_precis = 0
  1421. Global Const $out_device_precis = 5
  1422. Global Const $out_outline_precis = 8
  1423. Global Const $out_ps_only_precis = 10
  1424. Global Const $out_raster_precis = 6
  1425. Global Const $out_string_precis = 1
  1426. Global Const $out_stroke_precis = 3
  1427. Global Const $out_tt_only_precis = 7
  1428. Global Const $out_tt_precis = 4
  1429. Global Const $clip_character_precis = 1
  1430. Global Const $clip_default_precis = 0
  1431. Global Const $clip_embedded = 128
  1432. Global Const $clip_lh_angles = 16
  1433. Global Const $clip_mask = 15
  1434. Global Const $clip_stroke_precis = 2
  1435. Global Const $clip_tt_always = 32
  1436. Global Const $antialiased_quality = 4
  1437. Global Const $default_quality = 0
  1438. Global Const $draft_quality = 1
  1439. Global Const $nonantialiased_quality = 3
  1440. Global Const $proof_quality = 2
  1441. Global Const $default_pitch = 0
  1442. Global Const $fixed_pitch = 1
  1443. Global Const $variable_pitch = 2
  1444. Global Const $ff_decorative = 80
  1445. Global Const $ff_dontcare = 0
  1446. Global Const $ff_modern = 48
  1447. Global Const $ff_roman = 16
  1448. Global Const $ff_script = 64
  1449. Global Const $ff_swiss = 32
  1450. Global Const $tagpoint = "long X;long Y"
  1451. Global Const $tagrect = "long Left;long Top;long Right;long Bottom"
  1452. Global Const $tagsize = "long X;long Y"
  1453. Global Const $tagmargins = "int cxLeftWidth;int cxRightWidth;int cyTopHeight;int cyBottomHeight"
  1454. Global Const $tagfiletime = "dword Lo;dword Hi"
  1455. Global Const $tagsystemtime = "word Year;word Month;word Dow;word Day;word Hour;word Minute;word Second;word MSeconds"
  1456. Global Const $tagtime_zone_information = "long Bias;wchar StdName[32];word StdDate[8];long StdBias;wchar DayName[32];word DayDate[8];long DayBias"
  1457. Global Const $tagnmhdr = "hwnd hWndFrom;uint_ptr IDFrom;INT Code"
  1458. Global Const $tagcomboboxexitem = "uint Mask;int_ptr Item;ptr Text;int TextMax;int Image;int SelectedImage;int OverlayImage;" & "int Indent;lparam Param"
  1459. Global Const $tagnmcbedragbegin = $tagnmhdr & ";int ItemID;ptr szText"
  1460. Global Const $tagnmcbeendedit = $tagnmhdr & ";bool fChanged;int NewSelection;ptr szText;int Why"
  1461. Global Const $tagnmcomboboxex = $tagnmhdr & ";uint Mask;int_ptr Item;ptr Text;int TextMax;int Image;" & "int SelectedImage;int OverlayImage;int Indent;lparam Param"
  1462. Global Const $tagdtprange = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;" & "word MinSecond;word MinMSecond;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;" & "word MaxMinute;word MaxSecond;word MaxMSecond;bool MinValid;bool MaxValid"
  1463. Global Const $tagnmdatetimechange = $tagnmhdr & ";dword Flag;" & $tagsystemtime
  1464. Global Const $tagnmdatetimeformat = $tagnmhdr & ";ptr Format;" & $tagsystemtime & ";ptr pDisplay;wchar Display[64]"
  1465. Global Const $tagnmdatetimeformatquery = $tagnmhdr & ";ptr Format;long SizeX;long SizeY"
  1466. Global Const $tagnmdatetimekeydown = $tagnmhdr & ";int VirtKey;ptr Format;" & $tagsystemtime
  1467. Global Const $tagnmdatetimestring = $tagnmhdr & ";ptr UserString;" & $tagsystemtime & ";dword Flags"
  1468. Global Const $tageventlogrecord = "dword Length;dword Reserved;dword RecordNumber;dword TimeGenerated;dword TimeWritten;dword EventID;" & "word EventType;word NumStrings;word EventCategory;word ReservedFlags;dword ClosingRecordNumber;dword StringOffset;" & "dword UserSidLength;dword UserSidOffset;dword DataLength;dword DataOffset"
  1469. Global Const $taggdipbitmapdata = "uint Width;uint Height;int Stride;int Format;ptr Scan0;uint_ptr Reserved"
  1470. Global Const $taggdipencoderparam = "byte GUID[16];dword Count;dword Type;ptr Values"
  1471. Global Const $taggdipencoderparams = "dword Count;byte Params[0]"
  1472. Global Const $taggdiprectf = "float X;float Y;float Width;float Height"
  1473. Global Const $taggdipstartupinput = "uint Version;ptr Callback;bool NoThread;bool NoCodecs"
  1474. Global Const $taggdipstartupoutput = "ptr HookProc;ptr UnhookProc"
  1475. Global Const $taggdipimagecodecinfo = "byte CLSID[16];byte FormatID[16];ptr CodecName;ptr DllName;ptr FormatDesc;ptr FileExt;" & "ptr MimeType;dword Flags;dword Version;dword SigCount;dword SigSize;ptr SigPattern;ptr SigMask"
  1476. Global Const $taggdippencoderparams = "dword Count;byte Params[0]"
  1477. Global Const $taghditem = "uint Mask;int XY;ptr Text;handle hBMP;int TextMax;int Fmt;lparam Param;int Image;int Order;uint Type;ptr pFilter;uint State"
  1478. Global Const $tagnmhddispinfo = $tagnmhdr & ";int Item;uint Mask;ptr Text;int TextMax;int Image;lparam lParam"
  1479. Global Const $tagnmhdfilterbtnclick = $tagnmhdr & ";int Item;" & $tagrect
  1480. Global Const $tagnmheader = $tagnmhdr & ";int Item;int Button;ptr pItem"
  1481. Global Const $taggetipaddress = "byte Field4;byte Field3;byte Field2;byte Field1"
  1482. Global Const $tagnmipaddress = $tagnmhdr & ";int Field;int Value"
  1483. Global Const $taglvfindinfo = "uint Flags;ptr Text;lparam Param;" & $tagpoint & ";uint Direction"
  1484. Global Const $taglvhittestinfo = $tagpoint & ";uint Flags;int Item;int SubItem"
  1485. Global Const $taglvitem = "uint Mask;int Item;int SubItem;uint State;uint StateMask;ptr Text;int TextMax;int Image;lparam Param;" & "int Indent;int GroupID;uint Columns;ptr pColumns"
  1486. Global Const $tagnmlistview = $tagnmhdr & ";int Item;int SubItem;uint NewState;uint OldState;uint Changed;" & "long ActionX;long ActionY;lparam Param"
  1487. Global Const $tagnmlvcustomdraw = $tagnmhdr & ";dword dwDrawStage;handle hdc;long Left;long Top;long Right;long Bottom;" & "dword_ptr dwItemSpec;uint uItemState;lparam lItemlParam" & ";dword clrText;dword clrTextBk;int iSubItem;dword dwItemType;dword clrFace;int iIconEffect;" & "int iIconPhase;int iPartId;int iStateId;long TextLeft;long TextTop;long TextRight;long TextBottom;uint uAlign"
  1488. Global Const $tagnmlvdispinfo = $tagnmhdr & ";" & $taglvitem
  1489. Global Const $tagnmlvfinditem = $tagnmhdr & ";" & $taglvfindinfo
  1490. Global Const $tagnmlvgetinfotip = $tagnmhdr & ";dword Flags;ptr Text;int TextMax;int Item;int SubItem;lparam lParam"
  1491. Global Const $tagnmitemactivate = $tagnmhdr & ";int Index;int SubItem;uint NewState;uint OldState;uint Changed;" & $tagpoint & ";lparam lParam;uint KeyFlags"
  1492. Global Const $tagnmlvkeydown = $tagnmhdr & ";align 1;word VKey;uint Flags"
  1493. Global Const $tagnmlvscroll = $tagnmhdr & ";int DX;int DY"
  1494. Global Const $tagmchittestinfo = "uint Size;" & $tagpoint & ";uint Hit;" & $tagsystemtime
  1495. Global Const $tagmcmonthrange = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;word MinSecond;" & "word MinMSeconds;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;word MaxMinute;word MaxSecond;" & "word MaxMSeconds;short Span"
  1496. Global Const $tagmcrange = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;word MinSecond;" & "word MinMSeconds;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;word MaxMinute;word MaxSecond;" & "word MaxMSeconds;short MinSet;short MaxSet"
  1497. Global Const $tagmcselrange = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;word MinSecond;" & "word MinMSeconds;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;word MaxMinute;word MaxSecond;" & "word MaxMSeconds"
  1498. Global Const $tagnmdaystate = $tagnmhdr & ";" & $tagsystemtime & ";int DayState;ptr pDayState"
  1499. Global Const $tagnmselchange = $tagnmhdr & ";word BegYear;word BegMonth;word BegDOW;word BegDay;" & "word BegHour;word BegMinute;word BegSecond;word BegMSeconds;word EndYear;word EndMonth;word EndDOW;" & "word EndDay;word EndHour;word EndMinute;word EndSecond;word EndMSeconds"
  1500. Global Const $tagnmobjectnotify = $tagnmhdr & ";int Item;ptr piid;ptr pObject;long Result"
  1501. Global Const $tagnmtckeydown = $tagnmhdr & ";word VKey;uint Flags"
  1502. Global Const $tagtvitem = "uint Mask;handle hItem;uint State;uint StateMask;ptr Text;int TextMax;int Image;int SelectedImage;" & "int Children;lparam Param"
  1503. Global Const $tagtvitemex = $tagtvitem & ";int Integral"
  1504. Global Const $tagnmtreeview = $tagnmhdr & ";uint Action;uint OldMask;handle OldhItem;uint OldState;uint OldStateMask;" & "ptr OldText;int OldTextMax;int OldImage;int OldSelectedImage;int OldChildren;lparam OldParam;uint NewMask;handle NewhItem;" & "uint NewState;uint NewStateMask;ptr NewText;int NewTextMax;int NewImage;int NewSelectedImage;int NewChildren;" & "lparam NewParam;long PointX;long PointY"
  1505. Global Const $tagnmtvcustomdraw = $tagnmhdr & ";dword DrawStage;handle HDC;long Left;long Top;long Right;long Bottom;" & "dword_ptr ItemSpec;uint ItemState;lparam ItemParam;dword ClrText;dword ClrTextBk;int Level"
  1506. Global Const $tagnmtvdispinfo = $tagnmhdr & ";" & $tagtvitem
  1507. Global Const $tagnmtvgetinfotip = $tagnmhdr & ";ptr Text;int TextMax;handle hItem;lparam lParam"
  1508. Global Const $tagtvhittestinfo = $tagpoint & ";uint Flags;handle Item"
  1509. Global Const $tagnmtvkeydown = $tagnmhdr & ";word VKey;uint Flags"
  1510. Global Const $tagnmmouse = $tagnmhdr & ";dword_ptr ItemSpec;dword_ptr ItemData;" & $tagpoint & ";lparam HitInfo"
  1511. Global Const $tagtoken_privileges = "dword Count;int64 LUID;dword Attributes"
  1512. Global Const $tagimageinfo = "handle hBitmap;handle hMask;int Unused1;int Unused2;" & $tagrect
  1513. Global Const $tagmenuinfo = "dword Size;INT Mask;dword Style;uint YMax;handle hBack;dword ContextHelpID;ulong_ptr MenuData"
  1514. Global Const $tagmenuiteminfo = "uint Size;uint Mask;uint Type;uint State;uint ID;handle SubMenu;handle BmpChecked;handle BmpUnchecked;" & "ulong_ptr ItemData;ptr TypeData;uint CCH;handle BmpItem"
  1515. Global Const $tagrebarbandinfo = "uint cbSize;uint fMask;uint fStyle;dword clrFore;dword clrBack;ptr lpText;uint cch;" & "int iImage;hwnd hwndChild;uint cxMinChild;uint cyMinChild;uint cx;handle hbmBack;uint wID;uint cyChild;uint cyMaxChild;" & "uint cyIntegral;uint cxIdeal;lparam lParam;uint cxHeader"
  1516. Global Const $tagnmrebarautobreak = $tagnmhdr & ";uint uBand;uint wID;lparam lParam;uint uMsg;uint fStyleCurrent;bool fAutoBreak"
  1517. Global Const $tagnmrbautosize = $tagnmhdr & ";bool fChanged;long TargetLeft;long TargetTop;long TargetRight;long TargetBottom;" & "long ActualLeft;long ActualTop;long ActualRight;long ActualBottom"
  1518. Global Const $tagnmrebar = $tagnmhdr & ";dword dwMask;uint uBand;uint fStyle;uint wID;laram lParam"
  1519. Global Const $tagnmrebarchevron = $tagnmhdr & ";uint uBand;uint wID;lparam lParam;" & $tagrect & ";lparam lParamNM"
  1520. Global Const $tagnmrebarchildsize = $tagnmhdr & ";uint uBand;uint wID;long CLeft;long CTop;long CRight;long CBottom;" & "long BLeft;long BTop;long BRight;long BBottom"
  1521. Global Const $tagcolorscheme = "dword Size;dword BtnHighlight;dword BtnShadow"
  1522. Global Const $tagnmtoolbar = $tagnmhdr & ";int iItem;" & "int iBitmap;int idCommand;byte fsState;byte fsStyle;align;dword_ptr dwData;int_ptr iString" & ";int cchText;ptr pszText;" & $tagrect
  1523. Global Const $tagnmtbhotitem = $tagnmhdr & ";int idOld;int idNew;dword dwFlags"
  1524. Global Const $tagtbbutton = "int Bitmap;int Command;byte State;byte Style;align;dword_ptr Param;int_ptr String"
  1525. Global Const $tagtbbuttoninfo = "uint Size;dword Mask;int Command;int Image;byte State;byte Style;word CX;dword_ptr Param;ptr Text;int TextMax"
  1526. Global Const $tagnetresource = "dword Scope;dword Type;dword DisplayType;dword Usage;ptr LocalName;ptr RemoteName;ptr Comment;ptr Provider"
  1527. Global Const $tagoverlapped = "ulong_ptr Internal;ulong_ptr InternalHigh;dword Offset;dword OffsetHigh;handle hEvent"
  1528. Global Const $tagopenfilename = "dword StructSize;hwnd hwndOwner;handle hInstance;ptr lpstrFilter;ptr lpstrCustomFilter;" & "dword nMaxCustFilter;dword nFilterIndex;ptr lpstrFile;dword nMaxFile;ptr lpstrFileTitle;dword nMaxFileTitle;" & "ptr lpstrInitialDir;ptr lpstrTitle;dword Flags;word nFileOffset;word nFileExtension;ptr lpstrDefExt;lparam lCustData;" & "ptr lpfnHook;ptr lpTemplateName;ptr pvReserved;dword dwReserved;dword FlagsEx"
  1529. Global Const $tagbitmapinfo = "dword Size;long Width;long Height;word Planes;word BitCount;dword Compression;dword SizeImage;" & "long XPelsPerMeter;long YPelsPerMeter;dword ClrUsed;dword ClrImportant;dword RGBQuad"
  1530. Global Const $tagblendfunction = "byte Op;byte Flags;byte Alpha;byte Format"
  1531. Global Const $tagguid = "dword Data1;word Data2;word Data3;byte Data4[8]"
  1532. Global Const $tagwindowplacement = "uint length; uint flags;uint showCmd;long ptMinPosition[2];long ptMaxPosition[2];long rcNormalPosition[4]"
  1533. Global Const $tagwindowpos = "hwnd hWnd;hwnd InsertAfter;int X;int Y;int CX;int CY;uint Flags"
  1534. Global Const $tagscrollinfo = "uint cbSize;uint fMask;int nMin;int nMax;uint nPage;int nPos;int nTrackPos"
  1535. Global Const $tagscrollbarinfo = "dword cbSize;" & $tagrect & ";int dxyLineButton;int xyThumbTop;" & "int xyThumbBottom;int reserved;dword rgstate[6]"
  1536. Global Const $taglogfont = "long Height;long Width;long Escapement;long Orientation;long Weight;byte Italic;byte Underline;" & "byte Strikeout;byte CharSet;byte OutPrecision;byte ClipPrecision;byte Quality;byte PitchAndFamily;wchar FaceName[32]"
  1537. Global Const $tagkbdllhookstruct = "dword vkCode;dword scanCode;dword flags;dword time;ulong_ptr dwExtraInfo"
  1538. Global Const $tagprocess_information = "handle hProcess;handle hThread;dword ProcessID;dword ThreadID"
  1539. Global Const $tagstartupinfo = "dword Size;ptr Reserved1;ptr Desktop;ptr Title;dword X;dword Y;dword XSize;dword YSize;dword XCountChars;" & "dword YCountChars;dword FillAttribute;dword Flags;word ShowWindow;word Reserved2;ptr Reserved3;handle StdInput;" & "handle StdOutput;handle StdError"
  1540. Global Const $tagsecurity_attributes = "dword Length;ptr Descriptor;bool InheritHandle"
  1541. Global Const $tagwin32_find_data = "dword dwFileAttributes; dword ftCreationTime[2]; dword ftLastAccessTime[2]; dword ftLastWriteTime[2]; dword nFileSizeHigh; dword nFileSizeLow; dword dwReserved0; dword dwReserved1; wchar cFileName[260]; wchar cAlternateFileName[14]"
  1542.  
  1543. Func _winapi_getlasterror($curerr = @error, $curext = @extended)
  1544. Local $aresult = DllCall("kernel32.dll", "dword", "GetLastError")
  1545. Return SetError($curerr, $curext, $aresult[0])
  1546. EndFunc
  1547.  
  1548. Func _winapi_setlasterror($ierrcode, $curerr = @error, $curext = @extended)
  1549. DllCall("kernel32.dll", "none", "SetLastError", "dword", $ierrcode)
  1550. Return SetError($curerr, $curext)
  1551. EndFunc
  1552.  
  1553. Global Const $__miscconstant_cc_anycolor = 256
  1554. Global Const $__miscconstant_cc_fullopen = 2
  1555. Global Const $__miscconstant_cc_rgbinit = 1
  1556. Global Const $tagchoosecolor = "dword Size;hwnd hWndOwnder;handle hInstance;dword rgbResult;ptr CustColors;dword Flags;lparam lCustData;" & "ptr lpfnHook;ptr lpTemplateName"
  1557. Global Const $tagchoosefont = "dword Size;hwnd hWndOwner;handle hDC;ptr LogFont;int PointSize;dword Flags;dword rgbColors;lparam CustData;" & "ptr fnHook;ptr TemplateName;handle hInstance;ptr szStyle;word FontType;int SizeMin;int SizeMax"
  1558.  
  1559. Func _choosecolor($ireturntype = 0, $icolorref = 0, $ireftype = 0, $hwndownder = 0)
  1560. Local $custcolors = "dword[16]"
  1561. Local $tchoose = DllStructCreate($tagchoosecolor)
  1562. Local $tcc = DllStructCreate($custcolors)
  1563. If $ireftype = 1 Then
  1564. $icolorref = Int($icolorref)
  1565. ElseIf $ireftype = 2 Then
  1566. $icolorref = Hex(String($icolorref), 6)
  1567. $icolorref = "0x" & StringMid($icolorref, 5, 2) & StringMid($icolorref, 3, 2) & StringMid($icolorref, 1, 2)
  1568. EndIf
  1569. DllStructSetData($tchoose, "Size", DllStructGetSize($tchoose))
  1570. DllStructSetData($tchoose, "hWndOwnder", $hwndownder)
  1571. DllStructSetData($tchoose, "rgbResult", $icolorref)
  1572. DllStructSetData($tchoose, "CustColors", DllStructGetPtr($tcc))
  1573. DllStructSetData($tchoose, "Flags", BitOR($__miscconstant_cc_anycolor, $__miscconstant_cc_fullopen, $__miscconstant_cc_rgbinit))
  1574. Local $aresult = DllCall("comdlg32.dll", "bool", "ChooseColor", "ptr", DllStructGetPtr($tchoose))
  1575. If @error Then Return SetError(@error, @extended, -1)
  1576. If $aresult[0] = 0 Then Return SetError(-3, -3, -1)
  1577. Local $color_picked = DllStructGetData($tchoose, "rgbResult")
  1578. If $ireturntype = 1 Then
  1579. Return "0x" & Hex(String($color_picked), 6)
  1580. ElseIf $ireturntype = 2 Then
  1581. $color_picked = Hex(String($color_picked), 6)
  1582. Return "0x" & StringMid($color_picked, 5, 2) & StringMid($color_picked, 3, 2) & StringMid($color_picked, 1, 2)
  1583. ElseIf $ireturntype = 0 Then
  1584. Return $color_picked
  1585. Else
  1586. Return SetError(-4, -4, -1)
  1587. EndIf
  1588. EndFunc
  1589.  
  1590. Func _choosefont($sfontname = "Courier New", $ipointsize = 10, $icolorref = 0, $ifontweight = 0, $iitalic = False, $iunderline = False, $istrikethru = False, $hwndowner = 0)
  1591. Local $italic = 0, $underline = 0, $strikeout = 0
  1592. Local $lngdc = __misc_getdc(0)
  1593. Local $lfheight = Round(($ipointsize * __misc_getdevicecaps($lngdc, $logpixelsx)) / 72, 0)
  1594. __misc_releasedc(0, $lngdc)
  1595. Local $tchoosefont = DllStructCreate($tagchoosefont)
  1596. Local $tlogfont = DllStructCreate($taglogfont)
  1597. DllStructSetData($tchoosefont, "Size", DllStructGetSize($tchoosefont))
  1598. DllStructSetData($tchoosefont, "hWndOwner", $hwndowner)
  1599. DllStructSetData($tchoosefont, "LogFont", DllStructGetPtr($tlogfont))
  1600. DllStructSetData($tchoosefont, "PointSize", $ipointsize)
  1601. DllStructSetData($tchoosefont, "Flags", BitOR($cf_screenfonts, $cf_printerfonts, $cf_effects, $cf_inittologfontstruct, $cf_noscriptsel))
  1602. DllStructSetData($tchoosefont, "rgbColors", $icolorref)
  1603. DllStructSetData($tchoosefont, "FontType", 0)
  1604. DllStructSetData($tlogfont, "Height", $lfheight)
  1605. DllStructSetData($tlogfont, "Weight", $ifontweight)
  1606. DllStructSetData($tlogfont, "Italic", $iitalic)
  1607. DllStructSetData($tlogfont, "Underline", $iunderline)
  1608. DllStructSetData($tlogfont, "Strikeout", $istrikethru)
  1609. DllStructSetData($tlogfont, "FaceName", $sfontname)
  1610. Local $aresult = DllCall("comdlg32.dll", "bool", "ChooseFontW", "ptr", DllStructGetPtr($tchoosefont))
  1611. If @error Then Return SetError(@error, @extended, -1)
  1612. If $aresult[0] = 0 Then Return SetError(-3, -3, -1)
  1613. Local $fontname = DllStructGetData($tlogfont, "FaceName")
  1614. If StringLen($fontname) = 0 AND StringLen($sfontname) > 0 Then $fontname = $sfontname
  1615. If DllStructGetData($tlogfont, "Italic") Then $italic = 2
  1616. If DllStructGetData($tlogfont, "Underline") Then $underline = 4
  1617. If DllStructGetData($tlogfont, "Strikeout") Then $strikeout = 8
  1618. Local $attributes = BitOR($italic, $underline, $strikeout)
  1619. Local $size = DllStructGetData($tchoosefont, "PointSize") / 10
  1620. Local $colorref = DllStructGetData($tchoosefont, "rgbColors")
  1621. Local $weight = DllStructGetData($tlogfont, "Weight")
  1622. Local $color_picked = Hex(String($colorref), 6)
  1623. Return StringSplit($attributes & "," & $fontname & "," & $size & "," & $weight & "," & $colorref & "," & "0x" & $color_picked & "," & "0x" & StringMid($color_picked, 5, 2) & StringMid($color_picked, 3, 2) & StringMid($color_picked, 1, 2), ",")
  1624. EndFunc
  1625.  
  1626. Func _clipputfile($sfile, $sseparator = "|")
  1627. Local Const $gmem_moveable = 2, $cf_hdrop = 15
  1628. $sfile &= $sseparator & $sseparator
  1629. Local $nglobmemsize = (StringLen($sfile) + 20)
  1630. Local $aresult = DllCall("user32.dll", "bool", "OpenClipboard", "hwnd", 0)
  1631. If @error OR $aresult[0] = 0 Then Return SetError(1, _winapi_getlasterror(), False)
  1632. Local $ierror = 0, $ilasterror = 0
  1633. $aresult = DllCall("user32.dll", "bool", "EmptyClipboard")
  1634. If @error OR NOT $aresult[0] Then
  1635. $ierror = 2
  1636. $ilasterror = _winapi_getlasterror()
  1637. Else
  1638. $aresult = DllCall("kernel32.dll", "handle", "GlobalAlloc", "uint", $gmem_moveable, "ulong_ptr", $nglobmemsize)
  1639. If @error OR NOT $aresult[0] Then
  1640. $ierror = 3
  1641. $ilasterror = _winapi_getlasterror()
  1642. Else
  1643. Local $hglobal = $aresult[0]
  1644. $aresult = DllCall("kernel32.dll", "ptr", "GlobalLock", "handle", $hglobal)
  1645. If @error OR NOT $aresult[0] Then
  1646. $ierror = 4
  1647. $ilasterror = _winapi_getlasterror()
  1648. Else
  1649. Local $hlock = $aresult[0]
  1650. Local $dropfiles = DllStructCreate("dword;ptr;int;int;int;char[" & StringLen($sfile) + 1 & "]", $hlock)
  1651. If @error Then Return SetError(5, 6, False)
  1652. Local $tempstruct = DllStructCreate("dword;ptr;int;int;int")
  1653. DllStructSetData($dropfiles, 1, DllStructGetSize($tempstruct))
  1654. DllStructSetData($dropfiles, 2, 0)
  1655. DllStructSetData($dropfiles, 3, 0)
  1656. DllStructSetData($dropfiles, 4, 0)
  1657. DllStructSetData($dropfiles, 5, 0)
  1658. DllStructSetData($dropfiles, 6, $sfile)
  1659. For $i = 1 To StringLen($sfile)
  1660. If DllStructGetData($dropfiles, 6, $i) = $sseparator Then DllStructSetData($dropfiles, 6, Chr(0), $i)
  1661. Next
  1662. $aresult = DllCall("user32.dll", "handle", "SetClipboardData", "uint", $cf_hdrop, "handle", $hglobal)
  1663. If @error OR NOT $aresult[0] Then
  1664. $ierror = 6
  1665. $ilasterror = _winapi_getlasterror()
  1666. EndIf
  1667. $aresult = DllCall("kernel32.dll", "bool", "GlobalUnlock", "handle", $hglobal)
  1668. If (@error OR NOT $aresult[0]) AND NOT $ierror AND _winapi_getlasterror() Then
  1669. $ierror = 8
  1670. $ilasterror = _winapi_getlasterror()
  1671. EndIf
  1672. EndIf
  1673. $aresult = DllCall("kernel32.dll", "ptr", "GlobalFree", "handle", $hglobal)
  1674. If (@error OR NOT $aresult[0]) AND NOT $ierror Then
  1675. $ierror = 9
  1676. $ilasterror = _winapi_getlasterror()
  1677. EndIf
  1678. EndIf
  1679. EndIf
  1680. $aresult = DllCall("user32.dll", "bool", "CloseClipboard")
  1681. If (@error OR NOT $aresult[0]) AND NOT $ierror Then Return SetError(7, _winapi_getlasterror(), False)
  1682. If $ierror Then Return SetError($ierror, $ilasterror, False)
  1683. Return True
  1684. EndFunc
  1685.  
  1686. Func _iif($ftest, $vtrueval, $vfalseval)
  1687. If $ftest Then
  1688. Return $vtrueval
  1689. Else
  1690. Return $vfalseval
  1691. EndIf
  1692. EndFunc
  1693.  
  1694. Func _mousetrap($ileft = 0, $itop = 0, $iright = 0, $ibottom = 0)
  1695. Local $aresult
  1696. If @NumParams == 0 Then
  1697. $aresult = DllCall("user32.dll", "bool", "ClipCursor", "ptr", 0)
  1698. If @error OR NOT $aresult[0] Then Return SetError(1, _winapi_getlasterror(), False)
  1699. Else
  1700. If @NumParams == 2 Then
  1701. $iright = $ileft + 1
  1702. $ibottom = $itop + 1
  1703. EndIf
  1704. Local $trect = DllStructCreate($tagrect)
  1705. DllStructSetData($trect, "Left", $ileft)
  1706. DllStructSetData($trect, "Top", $itop)
  1707. DllStructSetData($trect, "Right", $iright)
  1708. DllStructSetData($trect, "Bottom", $ibottom)
  1709. $aresult = DllCall("user32.dll", "bool", "ClipCursor", "ptr", DllStructGetPtr($trect))
  1710. If @error OR NOT $aresult[0] Then Return SetError(2, _winapi_getlasterror(), False)
  1711. EndIf
  1712. Return True
  1713. EndFunc
  1714.  
  1715. Func _singleton($soccurencename, $iflag = 0)
  1716. Local Const $error_already_exists = 183
  1717. Local Const $security_descriptor_revision = 1
  1718. Local $psecurityattributes = 0
  1719. If BitAND($iflag, 2) Then
  1720. Local $tsecuritydescriptor = DllStructCreate("dword[5]")
  1721. Local $psecuritydescriptor = DllStructGetPtr($tsecuritydescriptor)
  1722. Local $aret = DllCall("advapi32.dll", "bool", "InitializeSecurityDescriptor", "ptr", $psecuritydescriptor, "dword", $security_descriptor_revision)
  1723. If @error Then Return SetError(@error, @extended, 0)
  1724. If $aret[0] Then
  1725. $aret = DllCall("advapi32.dll", "bool", "SetSecurityDescriptorDacl", "ptr", $psecuritydescriptor, "bool", 1, "ptr", 0, "bool", 0)
  1726. If @error Then Return SetError(@error, @extended, 0)
  1727. If $aret[0] Then
  1728. Local $structsecurityattributes = DllStructCreate($tagsecurity_attributes)
  1729. DllStructSetData($structsecurityattributes, 1, DllStructGetSize($structsecurityattributes))
  1730. DllStructSetData($structsecurityattributes, 2, $psecuritydescriptor)
  1731. DllStructSetData($structsecurityattributes, 3, 0)
  1732. $psecurityattributes = DllStructGetPtr($structsecurityattributes)
  1733. EndIf
  1734. EndIf
  1735. EndIf
  1736. Local $handle = DllCall("kernel32.dll", "handle", "CreateMutexW", "ptr", $psecurityattributes, "bool", 1, "wstr", $soccurencename)
  1737. If @error Then Return SetError(@error, @extended, 0)
  1738. Local $lasterror = DllCall("kernel32.dll", "dword", "GetLastError")
  1739. If @error Then Return SetError(@error, @extended, 0)
  1740. If $lasterror[0] = $error_already_exists Then
  1741. If BitAND($iflag, 1) Then
  1742. Return SetError($lasterror[0], $lasterror[0], 0)
  1743. Else
  1744. Exit -1
  1745. EndIf
  1746. EndIf
  1747. Return $handle[0]
  1748. EndFunc
  1749.  
  1750. Func _ispressed($shexkey, $vdll = "user32.dll")
  1751. Local $a_r = DllCall($vdll, "short", "GetAsyncKeyState", "int", "0x" & $shexkey)
  1752. If @error Then Return SetError(@error, @extended, False)
  1753. Return BitAND($a_r[0], 32768) <> 0
  1754. EndFunc
  1755.  
  1756. Func _versioncompare($sversion1, $sversion2)
  1757. If $sversion1 = $sversion2 Then Return 0
  1758. Local $sep = "."
  1759. If StringInStr($sversion1, $sep) = 0 Then $sep = ","
  1760. Local $aversion1 = StringSplit($sversion1, $sep)
  1761. Local $aversion2 = StringSplit($sversion2, $sep)
  1762. If UBound($aversion1) <> UBound($aversion2) OR UBound($aversion1) = 0 Then
  1763. SetExtended(1)
  1764. If $sversion1 > $sversion2 Then
  1765. Return 1
  1766. ElseIf $sversion1 < $sversion2 Then
  1767. Return -1
  1768. EndIf
  1769. Else
  1770. For $i = 1 To UBound($aversion1) - 1
  1771. If StringIsDigit($aversion1[$i]) AND StringIsDigit($aversion2[$i]) Then
  1772. If Number($aversion1[$i]) > Number($aversion2[$i]) Then
  1773. Return 1
  1774. ElseIf Number($aversion1[$i]) < Number($aversion2[$i]) Then
  1775. Return -1
  1776. EndIf
  1777. Else
  1778. SetExtended(1)
  1779. If $aversion1[$i] > $aversion2[$i] Then
  1780. Return 1
  1781. ElseIf $aversion1[$i] < $aversion2[$i] Then
  1782. Return -1
  1783. EndIf
  1784. EndIf
  1785. Next
  1786. EndIf
  1787. Return SetError(2, 0, 0)
  1788. EndFunc
  1789.  
  1790. Func __misc_getdc($hwnd)
  1791. Local $aresult = DllCall("User32.dll", "handle", "GetDC", "hwnd", $hwnd)
  1792. If @error OR NOT $aresult[0] Then Return SetError(1, _winapi_getlasterror(), 0)
  1793. Return $aresult[0]
  1794. EndFunc
  1795.  
  1796. Func __misc_getdevicecaps($hdc, $iindex)
  1797. Local $aresult = DllCall("GDI32.dll", "int", "GetDeviceCaps", "handle", $hdc, "int", $iindex)
  1798. If @error Then Return SetError(@error, @extended, 0)
  1799. Return $aresult[0]
  1800. EndFunc
  1801.  
  1802. Func __misc_releasedc($hwnd, $hdc)
  1803. Local $aresult = DllCall("User32.dll", "int", "ReleaseDC", "hwnd", $hwnd, "handle", $hdc)
  1804. If @error Then Return SetError(@error, @extended, False)
  1805. Return $aresult[0] <> 0
  1806. EndFunc
  1807.  
  1808. Func _arrayadd(ByRef $avarray, $vvalue)
  1809. If NOT IsArray($avarray) Then Return SetError(1, 0, -1)
  1810. If UBound($avarray, 0) <> 1 Then Return SetError(2, 0, -1)
  1811. Local $iubound = UBound($avarray)
  1812. ReDim $avarray[$iubound + 1]
  1813. $avarray[$iubound] = $vvalue
  1814. Return $iubound
  1815. EndFunc
  1816.  
  1817. Func _arraybinarysearch(Const ByRef $avarray, $vvalue, $istart = 0, $iend = 0)
  1818. If NOT IsArray($avarray) Then Return SetError(1, 0, -1)
  1819. If UBound($avarray, 0) <> 1 Then Return SetError(5, 0, -1)
  1820. Local $iubound = UBound($avarray) - 1
  1821. If $iend < 1 OR $iend > $iubound Then $iend = $iubound
  1822. If $istart < 0 Then $istart = 0
  1823. If $istart > $iend Then Return SetError(4, 0, -1)
  1824. Local $imid = Int(($iend + $istart) / 2)
  1825. If $avarray[$istart] > $vvalue OR $avarray[$iend] < $vvalue Then Return SetError(2, 0, -1)
  1826. While $istart <= $imid AND $vvalue <> $avarray[$imid]
  1827. If $vvalue < $avarray[$imid] Then
  1828. $iend = $imid - 1
  1829. Else
  1830. $istart = $imid + 1
  1831. EndIf
  1832. $imid = Int(($iend + $istart) / 2)
  1833. WEnd
  1834. If $istart > $iend Then Return SetError(3, 0, -1)
  1835. Return $imid
  1836. EndFunc
  1837.  
  1838. Func _arraycombinations(ByRef $avarray, $iset, $sdelim = "")
  1839. If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
  1840. If UBound($avarray, 0) <> 1 Then Return SetError(2, 0, 0)
  1841. Local $in = UBound($avarray)
  1842. Local $ir = $iset
  1843. Local $aidx[$ir]
  1844. For $i = 0 To $ir - 1
  1845. $aidx[$i] = $i
  1846. Next
  1847. Local $itotal = __array_combinations($in, $ir)
  1848. Local $ileft = $itotal
  1849. Local $aresult[$itotal + 1]
  1850. $aresult[0] = $itotal
  1851. Local $icount = 1
  1852. While $ileft > 0
  1853. __array_getnext($in, $ir, $ileft, $itotal, $aidx)
  1854. For $i = 0 To $iset - 1
  1855. $aresult[$icount] &= $avarray[$aidx[$i]] & $sdelim
  1856. Next
  1857. If $sdelim <> "" Then $aresult[$icount] = StringTrimRight($aresult[$icount], 1)
  1858. $icount += 1
  1859. WEnd
  1860. Return $aresult
  1861. EndFunc
  1862.  
  1863. Func _arrayconcatenate(ByRef $avarraytarget, Const ByRef $avarraysource, $istart = 0)
  1864. If NOT IsArray($avarraytarget) Then Return SetError(1, 0, 0)
  1865. If NOT IsArray($avarraysource) Then Return SetError(2, 0, 0)
  1866. If UBound($avarraytarget, 0) <> 1 Then
  1867. If UBound($avarraysource, 0) <> 1 Then Return SetError(5, 0, 0)
  1868. Return SetError(3, 0, 0)
  1869. EndIf
  1870. If UBound($avarraysource, 0) <> 1 Then Return SetError(4, 0, 0)
  1871. Local $iuboundtarget = UBound($avarraytarget) - $istart, $iuboundsource = UBound($avarraysource)
  1872. ReDim $avarraytarget[$iuboundtarget + $iuboundsource]
  1873. For $i = $istart To $iuboundsource - 1
  1874. $avarraytarget[$iuboundtarget + $i] = $avarraysource[$i]
  1875. Next
  1876. Return $iuboundtarget + $iuboundsource
  1877. EndFunc
  1878.  
  1879. Func _arraycreate($v_0, $v_1 = 0, $v_2 = 0, $v_3 = 0, $v_4 = 0, $v_5 = 0, $v_6 = 0, $v_7 = 0, $v_8 = 0, $v_9 = 0, $v_10 = 0, $v_11 = 0, $v_12 = 0, $v_13 = 0, $v_14 = 0, $v_15 = 0, $v_16 = 0, $v_17 = 0, $v_18 = 0, $v_19 = 0, $v_20 = 0)
  1880. Local $av_array[21] = [$v_0, $v_1, $v_2, $v_3, $v_4, $v_5, $v_6, $v_7, $v_8, $v_9, $v_10, $v_11, $v_12, $v_13, $v_14, $v_15, $v_16, $v_17, $v_18, $v_19, $v_20]
  1881. ReDim $av_array[@NumParams]
  1882. Return $av_array
  1883. EndFunc
  1884.  
  1885. Func _arraydelete(ByRef $avarray, $ielement)
  1886. If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
  1887. Local $iubound = UBound($avarray, 1) - 1
  1888. If NOT $iubound Then
  1889. $avarray = ""
  1890. Return 0
  1891. EndIf
  1892. If $ielement < 0 Then $ielement = 0
  1893. If $ielement > $iubound Then $ielement = $iubound
  1894. Switch UBound($avarray, 0)
  1895. Case 1
  1896. For $i = $ielement To $iubound - 1
  1897. $avarray[$i] = $avarray[$i + 1]
  1898. Next
  1899. ReDim $avarray[$iubound]
  1900. Case 2
  1901. Local $isubmax = UBound($avarray, 2) - 1
  1902. For $i = $ielement To $iubound - 1
  1903. For $j = 0 To $isubmax
  1904. $avarray[$i][$j] = $avarray[$i + 1][$j]
  1905. Next
  1906. Next
  1907. ReDim $avarray[$iubound][$isubmax + 1]
  1908. Case Else
  1909. Return SetError(3, 0, 0)
  1910. EndSwitch
  1911. Return $iubound
  1912. EndFunc
  1913.  
  1914. Func _arraydisplay(Const ByRef $avarray, $stitle = "Array: ListView Display", $iitemlimit = -1, $itranspose = 0, $sseparator = "", $sreplace = "|", $sheader = "")
  1915. If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
  1916. Local $idimension = UBound($avarray, 0), $iubound = UBound($avarray, 1) - 1, $isubmax = UBound($avarray, 2) - 1
  1917. If $idimension > 2 Then Return SetError(2, 0, 0)
  1918. If $sseparator = "" Then $sseparator = Chr(124)
  1919. If _arraysearch($avarray, $sseparator, 0, 0, 0, 1) <> -1 Then
  1920. For $x = 1 To 255
  1921. If $x >= 32 AND $x <= 127 Then ContinueLoop
  1922. Local $sfind = _arraysearch($avarray, Chr($x), 0, 0, 0, 1)
  1923. If $sfind = -1 Then
  1924. $sseparator = Chr($x)
  1925. ExitLoop
  1926. EndIf
  1927. Next
  1928. EndIf
  1929. Local $vtmp, $ibuffer = 64
  1930. Local $icollimit = 250
  1931. Local $ioneventmode = Opt("GUIOnEventMode", 0), $sdataseparatorchar = Opt("GUIDataSeparatorChar", $sseparator)
  1932. If $isubmax < 0 Then $isubmax = 0
  1933. If $itranspose Then
  1934. $vtmp = $iubound
  1935. $iubound = $isubmax
  1936. $isubmax = $vtmp
  1937. EndIf
  1938. If $isubmax > $icollimit Then $isubmax = $icollimit
  1939. If $iitemlimit < 1 Then $iitemlimit = $iubound
  1940. If $iubound > $iitemlimit Then $iubound = $iitemlimit
  1941. If $sheader = "" Then
  1942. $sheader = "Row "
  1943. For $i = 0 To $isubmax
  1944. $sheader &= $sseparator & "Col " & $i
  1945. Next
  1946. EndIf
  1947. Local $avarraytext[$iubound + 1]
  1948. For $i = 0 To $iubound
  1949. $avarraytext[$i] = "[" & $i & "]"
  1950. For $j = 0 To $isubmax
  1951. If $idimension = 1 Then
  1952. If $itranspose Then
  1953. $vtmp = $avarray[$j]
  1954. Else
  1955. $vtmp = $avarray[$i]
  1956. EndIf
  1957. Else
  1958. If $itranspose Then
  1959. $vtmp = $avarray[$j][$i]
  1960. Else
  1961. $vtmp = $avarray[$i][$j]
  1962. EndIf
  1963. EndIf
  1964. $vtmp = StringReplace($vtmp, $sseparator, $sreplace, 0, 1)
  1965. $avarraytext[$i] &= $sseparator & $vtmp
  1966. $vtmp = StringLen($vtmp)
  1967. If $vtmp > $ibuffer Then $ibuffer = $vtmp
  1968. Next
  1969. Next
  1970. $ibuffer += 1
  1971. Local Const $_arrayconstant_gui_dockborders = 102
  1972. Local Const $_arrayconstant_gui_dockbottom = 64
  1973. Local Const $_arrayconstant_gui_dockheight = 512
  1974. Local Const $_arrayconstant_gui_dockleft = 2
  1975. Local Const $_arrayconstant_gui_dockright = 4
  1976. Local Const $_arrayconstant_gui_event_close = -3
  1977. Local Const $_arrayconstant_lvif_param = 4
  1978. Local Const $_arrayconstant_lvif_text = 1
  1979. Local Const $_arrayconstant_lvm_getcolumnwidth = (4096 + 29)
  1980. Local Const $_arrayconstant_lvm_getitemcount = (4096 + 4)
  1981. Local Const $_arrayconstant_lvm_getitemstate = (4096 + 44)
  1982. Local Const $_arrayconstant_lvm_insertitemw = (4096 + 77)
  1983. Local Const $_arrayconstant_lvm_setextendedlistviewstyle = (4096 + 54)
  1984. Local Const $_arrayconstant_lvm_setitemw = (4096 + 76)
  1985. Local Const $_arrayconstant_lvs_ex_fullrowselect = 32
  1986. Local Const $_arrayconstant_lvs_ex_gridlines = 1
  1987. Local Const $_arrayconstant_lvs_showselalways = 8
  1988. Local Const $_arrayconstant_ws_ex_clientedge = 512
  1989. Local Const $_arrayconstant_ws_maximizebox = 65536
  1990. Local Const $_arrayconstant_ws_minimizebox = 131072
  1991. Local Const $_arrayconstant_ws_sizebox = 262144
  1992. Local Const $_arrayconstant_taglvitem = "int Mask;int Item;int SubItem;int State;int StateMask;ptr Text;int TextMax;int Image;int Param;int Indent;int GroupID;int Columns;ptr pColumns"
  1993. Local $iaddmask = BitOR($_arrayconstant_lvif_text, $_arrayconstant_lvif_param)
  1994. Local $tbuffer = DllStructCreate("wchar Text[" & $ibuffer & "]"), $pbuffer = DllStructGetPtr($tbuffer)
  1995. Local $titem = DllStructCreate($_arrayconstant_taglvitem), $pitem = DllStructGetPtr($titem)
  1996. DllStructSetData($titem, "Param", 0)
  1997. DllStructSetData($titem, "Text", $pbuffer)
  1998. DllStructSetData($titem, "TextMax", $ibuffer)
  1999. Local $iwidth = 640, $iheight = 480
  2000. Local $hgui = GUICreate($stitle, $iwidth, $iheight, Default, Default, BitOR($_arrayconstant_ws_sizebox, $_arrayconstant_ws_minimizebox, $_arrayconstant_ws_maximizebox))
  2001. Local $aiguisize = WinGetClientSize($hgui)
  2002. Local $hlistview = GUICtrlCreateListView($sheader, 0, 0, $aiguisize[0], $aiguisize[1] - 26, $_arrayconstant_lvs_showselalways)
  2003. Local $hcopy = GUICtrlCreateButton("Copy Selected", 3, $aiguisize[1] - 23, $aiguisize[0] - 6, 20)
  2004. GUICtrlSetResizing($hlistview, $_arrayconstant_gui_dockborders)
  2005. GUICtrlSetResizing($hcopy, $_arrayconstant_gui_dockleft + $_arrayconstant_gui_dockright + $_arrayconstant_gui_dockbottom + $_arrayconstant_gui_dockheight)
  2006. GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_setextendedlistviewstyle, $_arrayconstant_lvs_ex_gridlines, $_arrayconstant_lvs_ex_gridlines)
  2007. GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_setextendedlistviewstyle, $_arrayconstant_lvs_ex_fullrowselect, $_arrayconstant_lvs_ex_fullrowselect)
  2008. GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_setextendedlistviewstyle, $_arrayconstant_ws_ex_clientedge, $_arrayconstant_ws_ex_clientedge)
  2009. Local $aitem
  2010. For $i = 0 To $iubound
  2011. If GUICtrlCreateListViewItem($avarraytext[$i], $hlistview) = 0 Then
  2012. $aitem = StringSplit($avarraytext[$i], $sseparator)
  2013. DllStructSetData($tbuffer, "Text", $aitem[1])
  2014. DllStructSetData($titem, "Item", $i)
  2015. DllStructSetData($titem, "SubItem", 0)
  2016. DllStructSetData($titem, "Mask", $iaddmask)
  2017. GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_insertitemw, 0, $pitem)
  2018. DllStructSetData($titem, "Mask", $_arrayconstant_lvif_text)
  2019. For $j = 2 To $aitem[0]
  2020. DllStructSetData($tbuffer, "Text", $aitem[$j])
  2021. DllStructSetData($titem, "SubItem", $j - 1)
  2022. GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_setitemw, 0, $pitem)
  2023. Next
  2024. EndIf
  2025. Next
  2026. $iwidth = 0
  2027. For $i = 0 To $isubmax + 1
  2028. $iwidth += GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_getcolumnwidth, $i, 0)
  2029. Next
  2030. If $iwidth < 250 Then $iwidth = 230
  2031. $iwidth += 20
  2032. If $iwidth > @DesktopWidth Then $iwidth = @DesktopWidth - 100
  2033. WinMove($hgui, "", (@DesktopWidth - $iwidth) / 2, Default, $iwidth)
  2034. GUISetState(@SW_SHOW, $hgui)
  2035. While 1
  2036. Switch GUIGetMsg()
  2037. Case $_arrayconstant_gui_event_close
  2038. ExitLoop
  2039. Case $hcopy
  2040. Local $sclip = ""
  2041. Local $aicuritems[1] = [0]
  2042. For $i = 0 To GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_getitemcount, 0, 0)
  2043. If GUICtrlSendMsg($hlistview, $_arrayconstant_lvm_getitemstate, $i, 2) Then
  2044. $aicuritems[0] += 1
  2045. ReDim $aicuritems[$aicuritems[0] + 1]
  2046. $aicuritems[$aicuritems[0]] = $i
  2047. EndIf
  2048. Next
  2049. If NOT $aicuritems[0] Then
  2050. For $sitem In $avarraytext
  2051. $sclip &= $sitem & @CRLF
  2052. Next
  2053. Else
  2054. For $i = 1 To UBound($aicuritems) - 1
  2055. $sclip &= $avarraytext[$aicuritems[$i]] & @CRLF
  2056. Next
  2057. EndIf
  2058. ClipPut($sclip)
  2059. EndSwitch
  2060. WEnd
  2061. GUIDelete($hgui)
  2062. Opt("GUIOnEventMode", $ioneventmode)
  2063. Opt("GUIDataSeparatorChar", $sdataseparatorchar)
  2064. Return 1
  2065. EndFunc
  2066.  
  2067. Func _arrayfindall(Const ByRef $avarray, $vvalue, $istart = 0, $iend = 0, $icase = 0, $ipartial = 0, $isubitem = 0)
  2068. $istart = _arraysearch($avarray, $vvalue, $istart, $iend, $icase, $ipartial, 1, $isubitem)
  2069. If @error Then Return SetError(@error, 0, -1)
  2070. Local $iindex = 0, $avresult[UBound($avarray)]
  2071. Do
  2072. $avresult[$iindex] = $istart
  2073. $iindex += 1
  2074. $istart = _arraysearch($avarray, $vvalue, $istart + 1, $iend, $icase, $ipartial, 1, $isubitem)
  2075. Until @error
  2076. ReDim $avresult[$iindex]
  2077. Return $avresult
  2078. EndFunc
  2079.  
  2080. Func _arrayinsert(ByRef $avarray, $ielement, $vvalue = "")
  2081. If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
  2082. If UBound($avarray, 0) <> 1 Then Return SetError(2, 0, 0)
  2083. Local $iubound = UBound($avarray) + 1
  2084. ReDim $avarray[$iubound]
  2085. For $i = $iubound - 1 To $ielement + 1 Step -1
  2086. $avarray[$i] = $avarray[$i - 1]
  2087. Next
  2088. $avarray[$ielement] = $vvalue
  2089. Return $iubound
  2090. EndFunc
  2091.  
  2092. Func _arraymax(Const ByRef $avarray, $icompnumeric = 0, $istart = 0, $iend = 0)
  2093. Local $iresult = _arraymaxindex($avarray, $icompnumeric, $istart, $iend)
  2094. If @error Then Return SetError(@error, 0, "")
  2095. Return $avarray[$iresult]
  2096. EndFunc
  2097.  
  2098. Func _arraymaxindex(Const ByRef $avarray, $icompnumeric = 0, $istart = 0, $iend = 0)
  2099. If NOT IsArray($avarray) OR UBound($avarray, 0) <> 1 Then Return SetError(1, 0, -1)
  2100. If UBound($avarray, 0) <> 1 Then Return SetError(3, 0, -1)
  2101. Local $iubound = UBound($avarray) - 1
  2102. If $iend < 1 OR $iend > $iubound Then $iend = $iubound
  2103. If $istart < 0 Then $istart = 0
  2104. If $istart > $iend Then Return SetError(2, 0, -1)
  2105. Local $imaxindex = $istart
  2106. If $icompnumeric Then
  2107. For $i = $istart To $iend
  2108. If Number($avarray[$imaxindex]) < Number($avarray[$i]) Then $imaxindex = $i
  2109. Next
  2110. Else
  2111. For $i = $istart To $iend
  2112. If $avarray[$imaxindex] < $avarray[$i] Then $imaxindex = $i
  2113. Next
  2114. EndIf
  2115. Return $imaxindex
  2116. EndFunc
  2117.  
  2118. Func _arraymin(Const ByRef $avarray, $icompnumeric = 0, $istart = 0, $iend = 0)
  2119. Local $iresult = _arrayminindex($avarray, $icompnumeric, $istart, $iend)
  2120. If @error Then Return SetError(@error, 0, "")
  2121. Return $avarray[$iresult]
  2122. EndFunc
  2123.  
  2124. Func _arrayminindex(Const ByRef $avarray, $icompnumeric = 0, $istart = 0, $iend = 0)
  2125. If NOT IsArray($avarray) Then Return SetError(1, 0, -1)
  2126. If UBound($avarray, 0) <> 1 Then Return SetError(3, 0, -1)
  2127. Local $iubound = UBound($avarray) - 1
  2128. If $iend < 1 OR $iend > $iubound Then $iend = $iubound
  2129. If $istart < 0 Then $istart = 0
  2130. If $istart > $iend Then Return SetError(2, 0, -1)
  2131. Local $iminindex = $istart
  2132. If $icompnumeric Then
  2133. For $i = $istart To $iend
  2134. If Number($avarray[$iminindex]) > Number($avarray[$i]) Then $iminindex = $i
  2135. Next
  2136. Else
  2137. For $i = $istart To $iend
  2138. If $avarray[$iminindex] > $avarray[$i] Then $iminindex = $i
  2139. Next
  2140. EndIf
  2141. Return $iminindex
  2142. EndFunc
  2143.  
  2144. Func _arraypermute(ByRef $avarray, $sdelim = "")
  2145. If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
  2146. If UBound($avarray, 0) <> 1 Then Return SetError(2, 0, 0)
  2147. Local $isize = UBound($avarray), $ifactorial = 1, $aidx[$isize], $aresult[1], $icount = 1
  2148. For $i = 0 To $isize - 1
  2149. $aidx[$i] = $i
  2150. Next
  2151. For $i = $isize To 1 Step -1
  2152. $ifactorial *= $i
  2153. Next
  2154. ReDim $aresult[$ifactorial + 1]
  2155. $aresult[0] = $ifactorial
  2156. __array_exeterinternal($avarray, 0, $isize, $sdelim, $aidx, $aresult, $icount)
  2157. Return $aresult
  2158. EndFunc
  2159.  
  2160. Func _arraypop(ByRef $avarray)
  2161. If (NOT IsArray($avarray)) Then Return SetError(1, 0, "")
  2162. If UBound($avarray, 0) <> 1 Then Return SetError(2, 0, "")
  2163. Local $iubound = UBound($avarray) - 1, $slastval = $avarray[$iubound]
  2164. If NOT $iubound Then
  2165. $avarray = ""
  2166. Else
  2167. ReDim $avarray[$iubound]
  2168. EndIf
  2169. Return $slastval
  2170. EndFunc
  2171.  
  2172. Func _arraypush(ByRef $avarray, $vvalue, $idirection = 0)
  2173. If (NOT IsArray($avarray)) Then Return SetError(1, 0, 0)
  2174. If UBound($avarray, 0) <> 1 Then Return SetError(3, 0, 0)
  2175. Local $iubound = UBound($avarray) - 1
  2176. If IsArray($vvalue) Then
  2177. Local $iubounds = UBound($vvalue)
  2178. If ($iubounds - 1) > $iubound Then Return SetError(2, 0, 0)
  2179. If $idirection Then
  2180. For $i = $iubound To $iubounds Step -1
  2181. $avarray[$i] = $avarray[$i - $iubounds]
  2182. Next
  2183. For $i = 0 To $iubounds - 1
  2184. $avarray[$i] = $vvalue[$i]
  2185. Next
  2186. Else
  2187. For $i = 0 To $iubound - $iubounds
  2188. $avarray[$i] = $avarray[$i + $iubounds]
  2189. Next
  2190. For $i = 0 To $iubounds - 1
  2191. $avarray[$i + $iubound - $iubounds + 1] = $vvalue[$i]
  2192. Next
  2193. EndIf
  2194. Else
  2195. If $idirection Then
  2196. For $i = $iubound To 1 Step -1
  2197. $avarray[$i] = $avarray[$i - 1]
  2198. Next
  2199. $avarray[0] = $vvalue
  2200. Else
  2201. For $i = 0 To $iubound - 1
  2202. $avarray[$i] = $avarray[$i + 1]
  2203. Next
  2204. $avarray[$iubound] = $vvalue
  2205. EndIf
  2206. EndIf
  2207. Return 1
  2208. EndFunc
  2209.  
  2210. Func _arrayreverse(ByRef $avarray, $istart = 0, $iend = 0)
  2211. If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
  2212. If UBound($avarray, 0) <> 1 Then Return SetError(3, 0, 0)
  2213. Local $vtmp, $iubound = UBound($avarray) - 1
  2214. If $iend < 1 OR $iend > $iubound Then $iend = $iubound
  2215. If $istart < 0 Then $istart = 0
  2216. If $istart > $iend Then Return SetError(2, 0, 0)
  2217. For $i = $istart To Int(($istart + $iend - 1) / 2)
  2218. $vtmp = $avarray[$i]
  2219. $avarray[$i] = $avarray[$iend]
  2220. $avarray[$iend] = $vtmp
  2221. $iend -= 1
  2222. Next
  2223. Return 1
  2224. EndFunc
  2225.  
  2226. Func _arraysearch(Const ByRef $avarray, $vvalue, $istart = 0, $iend = 0, $icase = 0, $ipartial = 0, $iforward = 1, $isubitem = -1)
  2227. If NOT IsArray($avarray) Then Return SetError(1, 0, -1)
  2228. If UBound($avarray, 0) > 2 OR UBound($avarray, 0) < 1 Then Return SetError(2, 0, -1)
  2229. Local $iubound = UBound($avarray) - 1
  2230. If $iend < 1 OR $iend > $iubound Then $iend = $iubound
  2231. If $istart < 0 Then $istart = 0
  2232. If $istart > $iend Then Return SetError(4, 0, -1)
  2233. Local $istep = 1
  2234. If NOT $iforward Then
  2235. Local $itmp = $istart
  2236. $istart = $iend
  2237. $iend = $itmp
  2238. $istep = -1
  2239. EndIf
  2240. Switch UBound($avarray, 0)
  2241. Case 1
  2242. If NOT $ipartial Then
  2243. If NOT $icase Then
  2244. For $i = $istart To $iend Step $istep
  2245. If $avarray[$i] = $vvalue Then Return $i
  2246. Next
  2247. Else
  2248. For $i = $istart To $iend Step $istep
  2249. If $avarray[$i] == $vvalue Then Return $i
  2250. Next
  2251. EndIf
  2252. Else
  2253. For $i = $istart To $iend Step $istep
  2254. If StringInStr($avarray[$i], $vvalue, $icase) > 0 Then Return $i
  2255. Next
  2256. EndIf
  2257. Case 2
  2258. Local $iuboundsub = UBound($avarray, 2) - 1
  2259. If $isubitem > $iuboundsub Then $isubitem = $iuboundsub
  2260. If $isubitem < 0 Then
  2261. $isubitem = 0
  2262. Else
  2263. $iuboundsub = $isubitem
  2264. EndIf
  2265. For $j = $isubitem To $iuboundsub
  2266. If NOT $ipartial Then
  2267. If NOT $icase Then
  2268. For $i = $istart To $iend Step $istep
  2269. If $avarray[$i][$j] = $vvalue Then Return $i
  2270. Next
  2271. Else
  2272. For $i = $istart To $iend Step $istep
  2273. If $avarray[$i][$j] == $vvalue Then Return $i
  2274. Next
  2275. EndIf
  2276. Else
  2277. For $i = $istart To $iend Step $istep
  2278. If StringInStr($avarray[$i][$j], $vvalue, $icase) > 0 Then Return $i
  2279. Next
  2280. EndIf
  2281. Next
  2282. Case Else
  2283. Return SetError(7, 0, -1)
  2284. EndSwitch
  2285. Return SetError(6, 0, -1)
  2286. EndFunc
  2287.  
  2288. Func _arraysort(ByRef $avarray, $idescending = 0, $istart = 0, $iend = 0, $isubitem = 0)
  2289. If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
  2290. Local $iubound = UBound($avarray) - 1
  2291. If $iend < 1 OR $iend > $iubound Then $iend = $iubound
  2292. If $istart < 0 Then $istart = 0
  2293. If $istart > $iend Then Return SetError(2, 0, 0)
  2294. Switch UBound($avarray, 0)
  2295. Case 1
  2296. __arrayquicksort1d($avarray, $istart, $iend)
  2297. If $idescending Then _arrayreverse($avarray, $istart, $iend)
  2298. Case 2
  2299. Local $isubmax = UBound($avarray, 2) - 1
  2300. If $isubitem > $isubmax Then Return SetError(3, 0, 0)
  2301. If $idescending Then
  2302. $idescending = -1
  2303. Else
  2304. $idescending = 1
  2305. EndIf
  2306. __arrayquicksort2d($avarray, $idescending, $istart, $iend, $isubitem, $isubmax)
  2307. Case Else
  2308. Return SetError(4, 0, 0)
  2309. EndSwitch
  2310. Return 1
  2311. EndFunc
  2312.  
  2313. Func __arrayquicksort1d(ByRef $avarray, ByRef $istart, ByRef $iend)
  2314. If $iend <= $istart Then Return
  2315. Local $vtmp
  2316. If ($iend - $istart) < 15 Then
  2317. Local $vcur
  2318. For $i = $istart + 1 To $iend
  2319. $vtmp = $avarray[$i]
  2320. If IsNumber($vtmp) Then
  2321. For $j = $i - 1 To $istart Step -1
  2322. $vcur = $avarray[$j]
  2323. If ($vtmp >= $vcur AND IsNumber($vcur)) OR (NOT IsNumber($vcur) AND StringCompare($vtmp, $vcur) >= 0) Then ExitLoop
  2324. $avarray[$j + 1] = $vcur
  2325. Next
  2326. Else
  2327. For $j = $i - 1 To $istart Step -1
  2328. If (StringCompare($vtmp, $avarray[$j]) >= 0) Then ExitLoop
  2329. $avarray[$j + 1] = $avarray[$j]
  2330. Next
  2331. EndIf
  2332. $avarray[$j + 1] = $vtmp
  2333. Next
  2334. Return
  2335. EndIf
  2336. Local $l = $istart, $r = $iend, $vpivot = $avarray[Int(($istart + $iend) / 2)], $fnum = IsNumber($vpivot)
  2337. Do
  2338. If $fnum Then
  2339. While ($avarray[$l] < $vpivot AND IsNumber($avarray[$l])) OR (NOT IsNumber($avarray[$l]) AND StringCompare($avarray[$l], $vpivot) < 0)
  2340. $l += 1
  2341. WEnd
  2342. While ($avarray[$r] > $vpivot AND IsNumber($avarray[$r])) OR (NOT IsNumber($avarray[$r]) AND StringCompare($avarray[$r], $vpivot) > 0)
  2343. $r -= 1
  2344. WEnd
  2345. Else
  2346. While (StringCompare($avarray[$l], $vpivot) < 0)
  2347. $l += 1
  2348. WEnd
  2349. While (StringCompare($avarray[$r], $vpivot) > 0)
  2350. $r -= 1
  2351. WEnd
  2352. EndIf
  2353. If $l <= $r Then
  2354. $vtmp = $avarray[$l]
  2355. $avarray[$l] = $avarray[$r]
  2356. $avarray[$r] = $vtmp
  2357. $l += 1
  2358. $r -= 1
  2359. EndIf
  2360. Until $l > $r
  2361. __arrayquicksort1d($avarray, $istart, $r)
  2362. __arrayquicksort1d($avarray, $l, $iend)
  2363. EndFunc
  2364.  
  2365. Func __arrayquicksort2d(ByRef $avarray, ByRef $istep, ByRef $istart, ByRef $iend, ByRef $isubitem, ByRef $isubmax)
  2366. If $iend <= $istart Then Return
  2367. Local $vtmp, $l = $istart, $r = $iend, $vpivot = $avarray[Int(($istart + $iend) / 2)][$isubitem], $fnum = IsNumber($vpivot)
  2368. Do
  2369. If $fnum Then
  2370. While ($istep * ($avarray[$l][$isubitem] - $vpivot) < 0 AND IsNumber($avarray[$l][$isubitem])) OR (NOT IsNumber($avarray[$l][$isubitem]) AND $istep * StringCompare($avarray[$l][$isubitem], $vpivot) < 0)
  2371. $l += 1
  2372. WEnd
  2373. While ($istep * ($avarray[$r][$isubitem] - $vpivot) > 0 AND IsNumber($avarray[$r][$isubitem])) OR (NOT IsNumber($avarray[$r][$isubitem]) AND $istep * StringCompare($avarray[$r][$isubitem], $vpivot) > 0)
  2374. $r -= 1
  2375. WEnd
  2376. Else
  2377. While ($istep * StringCompare($avarray[$l][$isubitem], $vpivot) < 0)
  2378. $l += 1
  2379. WEnd
  2380. While ($istep * StringCompare($avarray[$r][$isubitem], $vpivot) > 0)
  2381. $r -= 1
  2382. WEnd
  2383. EndIf
  2384. If $l <= $r Then
  2385. For $i = 0 To $isubmax
  2386. $vtmp = $avarray[$l][$i]
  2387. $avarray[$l][$i] = $avarray[$r][$i]
  2388. $avarray[$r][$i] = $vtmp
  2389. Next
  2390. $l += 1
  2391. $r -= 1
  2392. EndIf
  2393. Until $l > $r
  2394. __arrayquicksort2d($avarray, $istep, $istart, $r, $isubitem, $isubmax)
  2395. __arrayquicksort2d($avarray, $istep, $l, $iend, $isubitem, $isubmax)
  2396. EndFunc
  2397.  
  2398. Func _arrayswap(ByRef $vitem1, ByRef $vitem2)
  2399. Local $vtmp = $vitem1
  2400. $vitem1 = $vitem2
  2401. $vitem2 = $vtmp
  2402. EndFunc
  2403.  
  2404. Func _arraytoclip(Const ByRef $avarray, $istart = 0, $iend = 0)
  2405. Local $sresult = _arraytostring($avarray, @CR, $istart, $iend)
  2406. If @error Then Return SetError(@error, 0, 0)
  2407. Return ClipPut($sresult)
  2408. EndFunc
  2409.  
  2410. Func _arraytostring(Const ByRef $avarray, $sdelim = "|", $istart = 0, $iend = 0)
  2411. If NOT IsArray($avarray) Then Return SetError(1, 0, "")
  2412. If UBound($avarray, 0) <> 1 Then Return SetError(3, 0, "")
  2413. Local $sresult, $iubound = UBound($avarray) - 1
  2414. If $iend < 1 OR $iend > $iubound Then $iend = $iubound
  2415. If $istart < 0 Then $istart = 0
  2416. If $istart > $iend Then Return SetError(2, 0, "")
  2417. For $i = $istart To $iend
  2418. $sresult &= $avarray[$i] & $sdelim
  2419. Next
  2420. Return StringTrimRight($sresult, StringLen($sdelim))
  2421. EndFunc
  2422.  
  2423. Func _arraytrim(ByRef $avarray, $itrimnum, $idirection = 0, $istart = 0, $iend = 0)
  2424. If NOT IsArray($avarray) Then Return SetError(1, 0, 0)
  2425. If UBound($avarray, 0) <> 1 Then Return SetError(2, 0, 0)
  2426. Local $iubound = UBound($avarray) - 1
  2427. If $iend < 1 OR $iend > $iubound Then $iend = $iubound
  2428. If $istart < 0 Then $istart = 0
  2429. If $istart > $iend Then Return SetError(5, 0, 0)
  2430. If $idirection Then
  2431. For $i = $istart To $iend
  2432. $avarray[$i] = StringTrimRight($avarray[$i], $itrimnum)
  2433. Next
  2434. Else
  2435. For $i = $istart To $iend
  2436. $avarray[$i] = StringTrimLeft($avarray[$i], $itrimnum)
  2437. Next
  2438. EndIf
  2439. Return 1
  2440. EndFunc
  2441.  
  2442. Func _arrayunique($aarray, $idimension = 1, $ibase = 0, $icase = 0, $vdelim = "|")
  2443. Local $iubounddim
  2444. If $vdelim = "|" Then $vdelim = Chr(1)
  2445. If NOT IsArray($aarray) Then Return SetError(1, 0, 0)
  2446. If NOT $idimension > 0 Then
  2447. Return SetError(3, 0, 0)
  2448. Else
  2449. $iubounddim = UBound($aarray, 1)
  2450. If @error Then Return SetError(3, 0, 0)
  2451. If $idimension > 1 Then
  2452. Local $aarraytmp[1]
  2453. For $i = 0 To $iubounddim - 1
  2454. _arrayadd($aarraytmp, $aarray[$i][$idimension - 1])
  2455. Next
  2456. _arraydelete($aarraytmp, 0)
  2457. Else
  2458. If UBound($aarray, 0) = 1 Then
  2459. Dim $aarraytmp[1]
  2460. For $i = 0 To $iubounddim - 1
  2461. _arrayadd($aarraytmp, $aarray[$i])
  2462. Next
  2463. _arraydelete($aarraytmp, 0)
  2464. Else
  2465. Dim $aarraytmp[1]
  2466. For $i = 0 To $iubounddim - 1
  2467. _arrayadd($aarraytmp, $aarray[$i][$idimension - 1])
  2468. Next
  2469. _arraydelete($aarraytmp, 0)
  2470. EndIf
  2471. EndIf
  2472. EndIf
  2473. Local $shold
  2474. For $icc = $ibase To UBound($aarraytmp) - 1
  2475. If NOT StringInStr($vdelim & $shold, $vdelim & $aarraytmp[$icc] & $vdelim, $icase) Then $shold &= $aarraytmp[$icc] & $vdelim
  2476. Next
  2477. If $shold Then
  2478. $aarraytmp = StringSplit(StringTrimRight($shold, StringLen($vdelim)), $vdelim, 1)
  2479. Return $aarraytmp
  2480. EndIf
  2481. Return SetError(2, 0, 0)
  2482. EndFunc
  2483.  
  2484. Func __array_exeterinternal(ByRef $avarray, $istart, $isize, $sdelim, ByRef $aidx, ByRef $aresult, ByRef $icount)
  2485. If $istart == $isize - 1 Then
  2486. For $i = 0 To $isize - 1
  2487. $aresult[$icount] &= $avarray[$aidx[$i]] & $sdelim
  2488. Next
  2489. If $sdelim <> "" Then $aresult[$icount] = StringTrimRight($aresult[$icount], 1)
  2490. $icount += 1
  2491. Else
  2492. Local $itemp
  2493. For $i = $istart To $isize - 1
  2494. $itemp = $aidx[$i]
  2495. $aidx[$i] = $aidx[$istart]
  2496. $aidx[$istart] = $itemp
  2497. __array_exeterinternal($avarray, $istart + 1, $isize, $sdelim, $aidx, $aresult, $icount)
  2498. $aidx[$istart] = $aidx[$i]
  2499. $aidx[$i] = $itemp
  2500. Next
  2501. EndIf
  2502. EndFunc
  2503.  
  2504. Func __array_combinations($in, $ir)
  2505. Local $i_total = 1
  2506. For $i = $ir To 1 Step -1
  2507. $i_total *= ($in / $i)
  2508. $in -= 1
  2509. Next
  2510. Return Round($i_total)
  2511. EndFunc
  2512.  
  2513. Func __array_getnext($in, $ir, ByRef $ileft, $itotal, ByRef $aidx)
  2514. If $ileft == $itotal Then
  2515. $ileft -= 1
  2516. Return
  2517. EndIf
  2518. Local $i = $ir - 1
  2519. While $aidx[$i] == $in - $ir + $i
  2520. $i -= 1
  2521. WEnd
  2522. $aidx[$i] += 1
  2523. For $j = $i + 1 To $ir - 1
  2524. $aidx[$j] = $aidx[$i] + $j - $i
  2525. Next
  2526. $ileft -= 1
  2527. EndFunc
  2528.  
  2529. Func startdbedit()
  2530. If GUICtrlRead($aofolder) = "" Then
  2531. MsgBox(1, "Fail", "Select Your AO Folder First. Bottom Of The Program.")
  2532. Else
  2533. Global $file_path = GUICtrlRead($aofolder) & "\cd_image\data\db\Resourcedatabase.dat.001"
  2534. If BitAND(GUICtrlRead($remblindcheck), $gui_checked) = $gui_checked Then
  2535. blinds()
  2536. EndIf
  2537. If BitAND(GUICtrlRead($dofcheck), $gui_checked) = $gui_checked Then
  2538. evades()
  2539. EndIf
  2540. If BitAND(GUICtrlRead($rrfecheck), $gui_checked) = $gui_checked Then
  2541. rrfe()
  2542. EndIf
  2543. If BitAND(GUICtrlRead($amscheck), $gui_checked) = $gui_checked Then
  2544. tms()
  2545. EndIf
  2546. If BitAND(GUICtrlRead($bccheck), $gui_checked) = $gui_checked Then
  2547. coon()
  2548. EndIf
  2549. If BitAND(GUICtrlRead($swimexpcheck), $gui_checked) = $gui_checked Then
  2550. swimex()
  2551. EndIf
  2552. If BitAND(GUICtrlRead($swimprofcheck), $gui_checked) = $gui_checked Then
  2553. swimprof()
  2554. EndIf
  2555. If BitAND(GUICtrlRead($quicknesscheck), $gui_checked) = $gui_checked Then
  2556. quickness()
  2557. EndIf
  2558. If BitAND(GUICtrlRead($adrencheck), $gui_checked) = $gui_checked Then
  2559. adren()
  2560. EndIf
  2561. If BitAND(GUICtrlRead($swiftnesscheck), $gui_checked) = $gui_checked Then
  2562. swiftness()
  2563. EndIf
  2564. GUICtrlSetData($dbstatus, "Done.")
  2565. EndIf
  2566. EndFunc
  2567.  
  2568. Func evades()
  2569. GUICtrlSetData($dbstatus, "Changing Dof/Limber")
  2570. $bdata = StringToBinary("Dance of FoolsIn")
  2571. Global $offset = _hexsearch($file_path, $bdata, 658837952)
  2572. If "0x" & Hex($offset) <> "0xFFFFFFFF" Then
  2573. $radw2 = "0xcfb7"
  2574. $bdata = BinaryToString($radw2)
  2575. $bdata2 = StringToBinary($bdata)
  2576. _hexwrite($file_path, "0x" & Hex($offset - 72), $bdata2)
  2577. $radw2 = "0xbca9"
  2578. $bdata = BinaryToString($radw2)
  2579. $bdata2 = StringToBinary($bdata)
  2580. _hexwrite($file_path, "0x" & Hex($offset - 40), $bdata2)
  2581. $radw2 = "0xbea9"
  2582. $bdata = BinaryToString($radw2)
  2583. $bdata2 = StringToBinary($bdata)
  2584. _hexwrite($file_path, "0x" & Hex($offset - 490), $bdata2)
  2585. EndIf
  2586. EndFunc
  2587.  
  2588. Func tms()
  2589. $radw2 = "0x014175676d656e746564204d"
  2590. $valuedata = BinaryToString($radw2)
  2591. $bdata = StringToBinary($valuedata)
  2592. $offset2 = 658837952
  2593. $radw2 = "0x9fa8"
  2594. $valuedata = BinaryToString($radw2)
  2595. $valuedata2 = StringToBinary($valuedata)
  2596. $ams5 = 0
  2597. For $i = 1 To 5
  2598. GUICtrlSetData($dbstatus, "Changing AMS #" & $i)
  2599. Global $offset = _hexsearch($file_path, $bdata, $offset2)
  2600. If "0x" & Hex($offset) <> "0xFFFFFFFF" AND $offset <> -1 Then
  2601. $offset = "0x" & Hex($offset - 47)
  2602. If _hexread($file_path, $offset, 2) <> $radw2 Then
  2603. _hexwrite($file_path, $offset, $valuedata2)
  2604. EndIf
  2605. $offset2 = $offset + 100
  2606. $ams5 = $ams5 + 1
  2607. If $ams5 = 6 Then
  2608. ExitLoop
  2609. EndIf
  2610. Else
  2611. ExitLoop
  2612. EndIf
  2613. Next
  2614. $radw = "0x01546f74616c204d6972726f7220536869656c64204d6b"
  2615. $valuedata = BinaryToString($radw)
  2616. $bdata = StringToBinary($valuedata)
  2617. $offset2 = 658837952
  2618. $radw2 = "0x9fa8"
  2619. $valuedata = BinaryToString($radw2)
  2620. $valuedata2 = StringToBinary($valuedata)
  2621. $ams5 = 1
  2622. For $i = 1 To 10
  2623. GUICtrlSetData($dbstatus, "Changing TMS #" & $i)
  2624. Global $offset = _hexsearch($file_path, $bdata, $offset2)
  2625. If "0x" & Hex($offset) <> "0xFFFFFFFF" AND $offset <> -1 Then
  2626. $offset = "0x" & Hex($offset - 47)
  2627. If _hexread($file_path, $offset, 2) <> $radw2 Then
  2628. _hexwrite($file_path, $offset, $valuedata2)
  2629. EndIf
  2630. $offset2 = $offset + 100
  2631. $ams5 = $ams5 + 1
  2632. If $ams5 = 12 Then
  2633. ExitLoop
  2634. EndIf
  2635. Else
  2636. ExitLoop
  2637. EndIf
  2638. Next
  2639. EndFunc
  2640.  
  2641. Func coon()
  2642. $radw = "0x0042696f20436f636f6f6e50726f766964657320616e206162736f727074696f6e20736869656c64"
  2643. $valuedata = BinaryToString($radw)
  2644. $bdata = StringToBinary($valuedata)
  2645. $offset2 = 658837952
  2646. $radw2 = "0xcfa9"
  2647. $valuedata = BinaryToString($radw2)
  2648. $valuedata2 = StringToBinary($valuedata)
  2649. $ams5 = 1
  2650. For $i = 1 To 10
  2651. Global $offset = _hexsearch($file_path, $bdata, $offset2)
  2652. If "0x" & Hex($offset) <> "0xFFFFFFFF" AND $offset <> -1 Then
  2653. GUICtrlSetData($dbstatus, "Changing Bio Cocoon #" & $i)
  2654. $offset = "0x" & Hex($offset - 39)
  2655. If _hexread($file_path, $offset, 2) <> $radw2 Then
  2656. _hexwrite($file_path, $offset, $valuedata2)
  2657. EndIf
  2658. $offset2 = $offset + 100
  2659. $ams5 = $ams5 + 1
  2660. If $ams5 = 9 Then
  2661. ExitLoop
  2662. EndIf
  2663. Else
  2664. ExitLoop
  2665. EndIf
  2666. Next
  2667. EndFunc
  2668.  
  2669. Func rrfe()
  2670. $radw = "0x005265616374697665205265666c656374697665204669656c642028457874656e6465642953"
  2671. $valuedata = BinaryToString($radw)
  2672. $bdata = StringToBinary($valuedata)
  2673. $offset2 = 658837952
  2674. $radw2 = "0x9ca9"
  2675. $valuedata = BinaryToString($radw2)
  2676. $valuedata2 = StringToBinary($valuedata)
  2677. GUICtrlSetData($dbstatus, "Changing RRFE")
  2678. Global $offset = _hexsearch($file_path, $bdata, $offset2)
  2679. If "0x" & Hex($offset) <> "0xFFFFFFFF" AND $offset <> -1 Then
  2680. $offset = "0x" & Hex($offset - 39)
  2681. If _hexread($file_path, $offset, 2) <> $radw2 Then
  2682. _hexwrite($file_path, $offset, $valuedata2)
  2683. EndIf
  2684. EndIf
  2685. EndFunc
  2686.  
  2687. Func blinds()
  2688. $radw = "0x0900000084aa0000"
  2689. $valuedata = BinaryToString($radw)
  2690. $bdata = StringToBinary($valuedata)
  2691. $offset2 = 658837952
  2692. $radw2 = "0x0000"
  2693. $valuedata = BinaryToString($radw2)
  2694. $valuedata2 = StringToBinary($valuedata)
  2695. For $i = 1 To 69
  2696. Global $offset = _hexsearch($file_path, $bdata, $offset2)
  2697. If "0x" & Hex($offset) <> "0xFFFFFFFF" AND $offset <> -1 Then
  2698. GUICtrlSetData($dbstatus, "Changing Blind #" & $i)
  2699. $offset = "0x" & Hex($offset + 6)
  2700. If _hexread($file_path, $offset, 2) = "0x84AA" Then
  2701. _hexwrite($file_path, $offset, $valuedata2)
  2702. EndIf
  2703. $offset2 = $offset + 10
  2704. Else
  2705. ExitLoop 1
  2706. EndIf
  2707. Next
  2708. EndFunc
  2709.  
  2710. Func swimex()
  2711. If GUICtrlRead($swimexpinput) <> "" Then
  2712. $offset2 = 658837952
  2713. $bdata = StringToBinary("Swim ExpertiseIn")
  2714. GUICtrlSetData($dbstatus, "Changing Swim Expertise")
  2715. Global $offset = _hexsearch($file_path, $bdata, $offset2)
  2716. If "0x" & Hex($offset) <> "0xFFFFFFFF" AND $offset <> -1 Then
  2717. $offset = "0x" & Hex($offset + 170)
  2718. $value = GUICtrlRead($swimexpinput)
  2719. If $value > 65535 Then
  2720. $hexvalue = Hex($value, 6)
  2721. Else
  2722. $hexvalue = Hex($value, 4)
  2723. EndIf
  2724. $hexleft = StringLeft($hexvalue, 2)
  2725. $hexright = StringRight($hexvalue, 2)
  2726. $hexvalue = StringTrimLeft($hexvalue, 2)
  2727. $hexvalue = StringTrimRight($hexvalue, 2)
  2728. $valuedata = BinaryToString("0x" & $hexright & $hexvalue & $hexleft)
  2729. $write = StringToBinary($valuedata)
  2730. _hexwrite($file_path, $offset, $write)
  2731. EndIf
  2732. Else
  2733. MsgBox(1, "Swim Expertise", "Helps when you give a value")
  2734. EndIf
  2735. EndFunc
  2736.  
  2737. Func quickness()
  2738. If GUICtrlRead($quicknessinput) <> "" Then
  2739. $offset2 = 658837952
  2740. $bdata = StringToBinary("QuicknessIn")
  2741. GUICtrlSetData($dbstatus, "Changing Quickness")
  2742. Global $offset = _hexsearch($file_path, $bdata, $offset2)
  2743. If "0x" & Hex($offset) <> "0xFFFFFFFF" AND $offset <> -1 Then
  2744. $offset = "0x" & Hex($offset + 164)
  2745. $value = GUICtrlRead($quicknessinput)
  2746. If $value > 65535 Then
  2747. $hexvalue = Hex($value, 6)
  2748. Else
  2749. $hexvalue = Hex($value, 4)
  2750. EndIf
  2751. $hexleft = StringLeft($hexvalue, 2)
  2752. $hexright = StringRight($hexvalue, 2)
  2753. $hexvalue = StringTrimLeft($hexvalue, 2)
  2754. $hexvalue = StringTrimRight($hexvalue, 2)
  2755. $valuedata = BinaryToString("0x" & $hexright & $hexvalue & $hexleft)
  2756. $write = StringToBinary($valuedata)
  2757. _hexwrite($file_path, $offset, $write)
  2758. EndIf
  2759. Else
  2760. MsgBox(1, "Quickness", "Helps when you give a value")
  2761. EndIf
  2762. EndFunc
  2763.  
  2764. Func adren()
  2765. If GUICtrlRead($adreninput) <> "" Then
  2766. $offset2 = 658837952
  2767. $bdata = StringToBinary("Adrenaline PumpIn")
  2768. GUICtrlSetData($dbstatus, "Changing Adren. Pump")
  2769. Global $offset = _hexsearch($file_path, $bdata, $offset2)
  2770. If "0x" & Hex($offset) <> "0xFFFFFFFF" AND $offset <> -1 Then
  2771. $offset = "0x" & Hex($offset + 164)
  2772. $value = GUICtrlRead($adreninput)
  2773. If $value > 65535 Then
  2774. $hexvalue = Hex($value, 6)
  2775. Else
  2776. $hexvalue = Hex($value, 4)
  2777. EndIf
  2778. $hexleft = StringLeft($hexvalue, 2)
  2779. $hexright = StringRight($hexvalue, 2)
  2780. $hexvalue = StringTrimLeft($hexvalue, 2)
  2781. $hexvalue = StringTrimRight($hexvalue, 2)
  2782. $valuedata = BinaryToString("0x" & $hexright & $hexvalue & $hexleft)
  2783. $write = StringToBinary($valuedata)
  2784. _hexwrite($file_path, $offset, $write)
  2785. EndIf
  2786. Else
  2787. MsgBox(1, "Adrenaline Pump", "Helps when you give a value")
  2788. EndIf
  2789. EndFunc
  2790.  
  2791. Func swiftness()
  2792. If GUICtrlRead($swiftnessinput) <> "" Then
  2793. $offset2 = 658837952
  2794. $bdata = StringToBinary("SwiftnessIn")
  2795. GUICtrlSetData($dbstatus, "Changing Swiftness")
  2796. Global $offset = _hexsearch($file_path, $bdata, $offset2)
  2797. If "0x" & Hex($offset) <> "0xFFFFFFFF" AND $offset <> -1 Then
  2798. $offset = "0x" & Hex($offset + 164)
  2799. $value = GUICtrlRead($swiftnessinput)
  2800. If $value > 65535 Then
  2801. $hexvalue = Hex($value, 6)
  2802. Else
  2803. $hexvalue = Hex($value, 4)
  2804. EndIf
  2805. $hexleft = StringLeft($hexvalue, 2)
  2806. $hexright = StringRight($hexvalue, 2)
  2807. $hexvalue = StringTrimLeft($hexvalue, 2)
  2808. $hexvalue = StringTrimRight($hexvalue, 2)
  2809. $valuedata = BinaryToString("0x" & $hexright & $hexvalue & $hexleft)
  2810. $write = StringToBinary($valuedata)
  2811. _hexwrite($file_path, $offset, $write)
  2812. EndIf
  2813. Else
  2814. MsgBox(1, "Swiftness", "Helps when you give a value")
  2815. EndIf
  2816. EndFunc
  2817.  
  2818. Func swimprof()
  2819. If GUICtrlRead($swimprofinput) <> "" Then
  2820. $offset2 = 658837952
  2821. $bdata = StringToBinary("Swim ProficiencyIn")
  2822. GUICtrlSetData($dbstatus, "Changing Swim Prof.")
  2823. Global $offset = _hexsearch($file_path, $bdata, $offset2)
  2824. If "0x" & Hex($offset) <> "0xFFFFFFFF" AND $offset <> -1 Then
  2825. $offset = "0x" & Hex($offset + 172)
  2826. $value = GUICtrlRead($swimprofinput)
  2827. If $value > 65535 Then
  2828. $hexvalue = Hex($value, 6)
  2829. Else
  2830. $hexvalue = Hex($value, 4)
  2831. EndIf
  2832. $hexleft = StringLeft($hexvalue, 2)
  2833. $hexright = StringRight($hexvalue, 2)
  2834. $hexvalue = StringTrimLeft($hexvalue, 2)
  2835. $hexvalue = StringTrimRight($hexvalue, 2)
  2836. $valuedata = BinaryToString("0x" & $hexright & $hexvalue & $hexleft)
  2837. $write = StringToBinary($valuedata)
  2838. _hexwrite($file_path, $offset, $write)
  2839. EndIf
  2840. Else
  2841. MsgBox(1, "Swim Proficiency", "Helps when you give a value")
  2842. EndIf
  2843. EndFunc
  2844.  
  2845. Func get_angle()
  2846. $pi = 3.14159265358979
  2847. $handle = _memoryopen($ipid)
  2848. Return atan2(_memoryread($vectory, $handle, "Float"), _memoryread($vectorx, $handle, "Float")) * 180 / $pi
  2849. _memoryclose($handle)
  2850. EndFunc
  2851.  
  2852. Func angle_to_vector($angle)
  2853. Local $new_vector[2]
  2854. $heading = $pi * $angle / 180
  2855. $new_vector[0] = $inc2 * Sin($heading)
  2856. $new_vector[1] = $inc2 * Cos($heading)
  2857. Return $new_vector
  2858. EndFunc
  2859.  
  2860. Func atan2($x, $y)
  2861. Local Const $pi = 3.14159265358979
  2862. If $y < 0 Then
  2863. Return -atan2($x, -$y)
  2864. ElseIf $x < 0 Then
  2865. Return $pi - ATan(-$y / $x)
  2866. ElseIf $x > 0 Then
  2867. Return ATan($y / $x)
  2868. ElseIf $y <> 0 Then
  2869. Return $pi / 2
  2870. Else
  2871. SetError(1)
  2872. EndIf
  2873. EndFunc
  2874.  
  2875. Func updateguimemory()
  2876. $x = _memoryread($addressx, $handle, "Float")
  2877. $y = _memoryread($addressy, $handle, "Float")
  2878. $z = _memoryread($addressz, $handle, "Float")
  2879. $tx = _memoryread($targetcoordx, $handle, "Float")
  2880. $ty = _memoryread($targetcoordy, $handle, "Float")
  2881. $tz = _memoryread($targetcoordz, $handle, "Float")
  2882. If IsFloat($x) AND $x <> $lastx Then
  2883. $lastx = $x
  2884. $x = StringSplit($x, ".")
  2885. $xnew = StringLeft($x[2], 1)
  2886. GUICtrlSetData($xcoord, "X: " & $x[1] & "." & $xnew)
  2887. ElseIf $x <> $lastx Then
  2888. GUICtrlSetData($xcoord, "X: " & $x)
  2889. $lastx = $x
  2890. EndIf
  2891. If IsFloat($y) AND $y <> $lasty Then
  2892. $lasty = $y
  2893. $y = StringSplit($y, ".")
  2894. $ynew = StringLeft($y[2], 1)
  2895. GUICtrlSetData($ycoord, "Y: " & $y[1] & "." & $ynew)
  2896. ElseIf $y <> $lasty Then
  2897. GUICtrlSetData($ycoord, "Y: " & $y)
  2898. $lasty = $y
  2899. EndIf
  2900. If IsFloat($z) AND $z <> $lastz Then
  2901. $lastz = $z
  2902. $z = StringSplit($z, ".")
  2903. $znew = StringLeft($z[2], 1)
  2904. GUICtrlSetData($zcoord, "Z: " & $z[1] & "." & $znew)
  2905. ElseIf $z <> $lastz Then
  2906. $lastz = $z
  2907. GUICtrlSetData($zcoord, "Z: " & $z)
  2908. EndIf
  2909. If IsFloat($tx) AND $tx <> $lasttx Then
  2910. $lasttx = $tx
  2911. $tx = StringSplit($tx, ".")
  2912. $txnew = StringLeft($tx[2], 1)
  2913. GUICtrlSetData($targetxcoord, "X: " & $tx[1] & "." & $txnew)
  2914. ElseIf $tx <> $lasttx Then
  2915. $lasttx = $tx
  2916. GUICtrlSetData($targetxcoord, "X: " & $tx)
  2917. EndIf
  2918. If IsFloat($ty) AND $ty <> $lastty Then
  2919. $lastty = $ty
  2920. $ty = StringSplit($ty, ".")
  2921. $tynew = StringLeft($ty[2], 1)
  2922. GUICtrlSetData($targetycoord, "Y: " & $ty[1] & "." & $tynew)
  2923. ElseIf $ty <> $lastty Then
  2924. $lastty = $ty
  2925. GUICtrlSetData($targetycoord, "Y: " & $ty)
  2926. EndIf
  2927. If IsFloat($tz) AND $tz <> $lasttz Then
  2928. $lasttz = $tz
  2929. $tz = StringSplit($tz, ".")
  2930. $tznew = StringLeft($tz[2], 1)
  2931. GUICtrlSetData($targetzcoord, "Z: " & $tz[1] & "." & $tznew)
  2932. ElseIf $tz <> $lasttz Then
  2933. $lasttz = $tz
  2934. If $tz = 0 Then
  2935. GUICtrlSetData($targetzcoord, "Z: " & $tz)
  2936. Else
  2937. GUICtrlSetData($targetzcoord, "Z: " & $tz)
  2938. EndIf
  2939. EndIf
  2940. EndFunc
  2941.  
  2942. Func updatepointers()
  2943. Global $ipid = getaoclients()
  2944. If $ipid = 0 Then Return
  2945. GUICtrlSetData($status, "Attached To Client.")
  2946. Global $handle = _memoryopen($ipid)
  2947. Global $mhandle = WinGetHandle("Anarchy Online")
  2948. Global $ptr = _memorymodulegetbaseaddress($ipid, "n3.dll") + 378048
  2949. Global $off1 = Dec("84")
  2950. Global $off2 = Dec("50")
  2951. Global $off3 = Dec("5C")
  2952. $baseaddr = _memoryread($ptr, $handle)
  2953. $lvl1 = "0x" & Hex($baseaddr + $off1)
  2954. $baseaddr = _memoryread($lvl1, $handle)
  2955. $lvl2 = "0x" & Hex($baseaddr + $off2)
  2956. $baseaddr = _memoryread($lvl2, $handle)
  2957. $lvl3 = "0x" & Hex($baseaddr + $off3)
  2958. Global $off1 = Dec("84")
  2959. Global $off2 = Dec("50")
  2960. Global $off3 = Dec("180")
  2961. Global $off4 = Dec("4")
  2962. $baseaddr = _memoryread($ptr, $handle)
  2963. $statelvl1 = "0x" & Hex($baseaddr + $off1)
  2964. $baseaddr = _memoryread($statelvl1, $handle)
  2965. $statelvl2 = "0x" & Hex($baseaddr + $off2)
  2966. $baseaddr = _memoryread($statelvl2, $handle)
  2967. $statelvl3 = "0x" & Hex($baseaddr + $off3)
  2968. $baseaddr = _memoryread($statelvl3, $handle)
  2969. $tp = leveluppointer($ptr, "0x7c")
  2970. $tp2 = leveluppointer($tp, "0x50")
  2971. $tp3 = leveluppointer($tp2, "0x17C")
  2972. $targetcoordx = leveluppointer($tp3, "0x58")
  2973. $targetcoordy = $targetcoordx + 8
  2974. $targetcoordz = $targetcoordx + 4
  2975. $mouse_world_pos_addr2 = leveluppointer($ptr, "0x7c")
  2976. Global $mouseworldxoffsets[2] = [2562280, 164]
  2977. Global $mouse_world_pos_addr = leveluppointer($mouse_world_pos_addr2, "0x180")
  2978. Global $stateaddr = "0x" & Hex($baseaddr + $off4)
  2979. Global $addressz = $lvl3
  2980. Global $addressy = $addressz + 4
  2981. Global $addressx = $addressz - 4
  2982. Global $vectorx = $addressz + 100
  2983. Global $vectory = $addressz + 108
  2984. Global $jump = $addressz - 8
  2985. Global $speed = "0x" & Hex($addressz - 32)
  2986. Global $speedside = "0x" & Hex($addressz + 792)
  2987. Global $accel = "0x" & Hex($lvl3 - 36)
  2988. EndFunc
  2989.  
  2990. Func hpupdate()
  2991. Dim $baseaddr = _memorymodulegetbaseaddress($ipid, "GUI.dll") + 2627628
  2992. Global $off1 = Dec("1c")
  2993. $baseaddr2 = _memoryread($baseaddr, $handle)
  2994. Global $targethp = "0x" & Hex($baseaddr2 + $off1)
  2995. Global $targetmaxhp = $targethp + Dec("4")
  2996. EndFunc
  2997.  
  2998. Func walkonwater()
  2999. If BitAND(GUICtrlRead($wowc), $gui_checked) = $gui_checked Then
  3000. If _memoryread($stateaddr, $handle) = 4 Then
  3001. _memorywrite($stateaddr, $handle, "3")
  3002. If _ispressed("57") Then
  3003. Send("{w Up}")
  3004. Send("{w Down}")
  3005. ElseIf _ispressed("26") Then
  3006. Send("{up Up}")
  3007. Send("{up Down}")
  3008. Else
  3009. Send("{Up}")
  3010. EndIf
  3011. EndIf
  3012. EndIf
  3013. EndFunc
  3014.  
  3015. Func jump()
  3016. If BitAND(GUICtrlRead($jumpc), $gui_checked) = $gui_checked Then
  3017. $jumpv = _memoryread($jump, $handle, "Float")
  3018. If $jumpv >= 0 Then HotKeySet("{Space}")
  3019. If $jumpv = 0 Then
  3020. $allow = True
  3021. EndIf
  3022. If BitAND(GUICtrlRead($jumpc), $gui_checked) = $gui_checked AND $allow = True AND $jumpv > 0 Then
  3023. $sliderinfo = GUICtrlRead($jumps)
  3024. _memorywrite($jump, $handle, $sliderinfo, "Float")
  3025. $allow = False
  3026. ElseIf BitAND(GUICtrlRead($jumpc), $gui_checked) = $gui_checked AND BitAND(GUICtrlRead($amjc), $gui_checked) AND $jumpv < 0 Then
  3027. HotKeySet("{Space}", "EXTRAJUMP")
  3028. EndIf
  3029. EndIf
  3030. EndFunc
  3031.  
  3032. Func speed()
  3033. If BitAND(GUICtrlRead($speedc), $gui_checked) = $gui_checked Then
  3034. $sliderinfo = GUICtrlRead($speeds)
  3035. _memorywrite($speed, $handle, $sliderinfo, "Float")
  3036. _memorywrite($accel, $handle, "10000", "Float")
  3037. $sidestep = _memoryread($speedside, $handle, "Float")
  3038. If $sidestep > 0 Then
  3039. _memorywrite($speedside, $handle, $sliderinfo / 2, "Float")
  3040. EndIf
  3041. If $sidestep < 0 Then
  3042. _memorywrite($speedside, $handle, "-" & $sliderinfo / 2, "Float")
  3043. EndIf
  3044. EndIf
  3045. EndFunc
  3046.  
  3047. Func extrajump()
  3048. $sliderinfo = GUICtrlRead($jumps)
  3049. _memorywrite($jump, $handle, $sliderinfo, "Float")
  3050. Send("{z}")
  3051. EndFunc
  3052.  
  3053. Func east()
  3054. $vector = angle_to_vector(get_angle() + 90)
  3055. _memorywrite($addressx, $handle, _memoryread($addressx, $handle, "Float") + $vector[0], "Float")
  3056. _memorywrite($addressy, $handle, _memoryread($addressy, $handle, "Float") + $vector[1], "Float")
  3057. EndFunc
  3058.  
  3059. Func west()
  3060. $vector = angle_to_vector(get_angle() - 90)
  3061. _memorywrite($addressx, $handle, _memoryread($addressx, $handle, "Float") + $vector[0], "Float")
  3062. _memorywrite($addressy, $handle, _memoryread($addressy, $handle, "Float") + $vector[1], "Float")
  3063. EndFunc
  3064.  
  3065. Func north()
  3066. $vector = angle_to_vector(get_angle())
  3067. _memorywrite($addressx, $handle, _memoryread($addressx, $handle, "Float") + $vector[0], "Float")
  3068. _memorywrite($addressy, $handle, _memoryread($addressy, $handle, "Float") + $vector[1], "Float")
  3069. EndFunc
  3070.  
  3071. Func south()
  3072. $vector = angle_to_vector(get_angle() + 180)
  3073. _memorywrite($addressx, $handle, _memoryread($addressx, $handle, "Float") + $vector[0], "Float")
  3074. _memorywrite($addressy, $handle, _memoryread($addressy, $handle, "Float") + $vector[1], "Float")
  3075. EndFunc
  3076.  
  3077. Func up()
  3078. $z = _memoryread($addressz, $handle, "Float")
  3079. $inc = $z + $inc2
  3080. _memorywrite($addressz, $handle, $inc, "Float")
  3081. EndFunc
  3082.  
  3083. Func down()
  3084. $z = _memoryread($addressz, $handle, "Float")
  3085. $inc = $z - $inc2
  3086. _memorywrite($addressz, $handle, $inc, "Float")
  3087. EndFunc
  3088.  
  3089. Func tele_to_mouse()
  3090. $mouseworldx = get_pointer_target_from_dll("GUI.dll", $mouseworldxoffsets)
  3091. $mouseworldy = $mouseworldx + 8
  3092. $mouseworldz = $mouseworldx + 4
  3093. $x = _memoryread($mouseworldx, $handle, "float")
  3094. $y = _memoryread($mouseworldy, $handle, "float")
  3095. $z = _memoryread($mouseworldz, $handle, "float")
  3096. _memorywrite($addressx, $handle, $x, "Float")
  3097. _memorywrite($addressy, $handle, $y, "Float")
  3098. _memorywrite($addressz, $handle, $z, "Float")
  3099. _sleep(500)
  3100. EndFunc
  3101.  
  3102. Func get_pointer_target_from_dll($dll_name, $offset_array)
  3103. $address = _memorymodulegetbaseaddress($ipid, $dll_name) + $offset_array[0]
  3104. For $i = 1 To UBound($offset_array) - 1
  3105. $address = _memoryread($address, $handle) + $offset_array[$i]
  3106. Next
  3107. Return "0x" & Hex($address)
  3108. EndFunc
  3109.  
  3110. Func ontarget()
  3111. $targetx = _memoryread($targetcoordx, $handle, "Float")
  3112. $targety = _memoryread($targetcoordy, $handle, "Float")
  3113. $targetz = _memoryread($targetcoordz, $handle, "Float")
  3114. _memorywrite($addressx, $handle, $targetx, "Float")
  3115. _memorywrite($addressy, $handle, $targety, "Float")
  3116. _memorywrite($addressz, $handle, $targetz, "Float")
  3117. EndFunc
  3118.  
  3119. Func getaoclients()
  3120. $lastselect = GUICtrlRead($charname)
  3121. Global $clients[7]
  3122. Global $clientname[7]
  3123. $list = ProcessList("AnarchyOnline.exe")
  3124. If $list[0][0] = 0 Then
  3125. GUICtrlSetData($charname, "")
  3126. GUICtrlSetData($status, "No Anarchy Clients Found.")
  3127. Return 0
  3128. EndIf
  3129. For $p = 1 To $list[0][0]
  3130. $clients[$p] = $list[$p][1]
  3131. Next
  3132. GUICtrlSetData($charname, "")
  3133. For $c = 1 To $list[0][0]
  3134. $handle2 = _memoryopen($clients[$c])
  3135. Global $nameaddr = _memorymodulegetbaseaddress($clients[$c], "Interfaces.dll") + 203488
  3136. Global $namecheck = _memoryread($nameaddr, $handle2, "Char[14]")
  3137. If $namecheck <> "" Then
  3138. GUICtrlSetData($charname, $namecheck)
  3139. $clientname[$c] = $namecheck
  3140. EndIf
  3141. _memoryclose($handle2)
  3142. Next
  3143. If $list[0][0] = 1 Then
  3144. $stext = ""
  3145. _guictrlcomboboxex_getitemtext($charname, 0, $stext)
  3146. _guictrlcombobox_selectstring($charname, $stext)
  3147. Else
  3148. _guictrlcombobox_selectstring($charname, $lastselect)
  3149. EndIf
  3150. For $h = 1 To UBound($clients) - 1
  3151. If GUICtrlRead($charname) = $clientname[$h] Then
  3152. $returnhandle = $clients[$h]
  3153. Return $returnhandle
  3154. EndIf
  3155. Next
  3156. EndFunc
  3157.  
  3158. Func warp()
  3159. $splitwarp = StringSplit(_guictrllistview_getitemtextstring($waypoints), "|")
  3160. If $splitwarp[2] > 0 Then
  3161. _memorywrite($addressx, $handle, $splitwarp[2], "Float")
  3162. _memorywrite($addressy, $handle, $splitwarp[3], "Float")
  3163. _memorywrite($addressz, $handle, $splitwarp[4], "Float")
  3164. EndIf
  3165. Send("{left}")
  3166. EndFunc
  3167.  
  3168. Func targetdata()
  3169. updatetargetdata()
  3170. $hp = _memoryread($targethp, $handle)
  3171. $maxhp = _memoryread($targetmaxhp, $handle)
  3172. $nano = _memoryread($targetnano, $handle)
  3173. $percent = ($hp / $maxhp) * 100
  3174. $cap = $maxhp * 0.3
  3175. If IsFloat($percent) Then
  3176. $percent = StringSplit($percent, ".")
  3177. $percentnew = StringLeft($percent[2], 1)
  3178. $percent = $percent[1] & "." & $percentnew
  3179. EndIf
  3180. If $hp = 0 AND $maxhp = 0 AND $nano = 0 Then
  3181. $hp = "No Target"
  3182. $maxhp = "No Target"
  3183. $nano = "No Target"
  3184. $percent = ""
  3185. EndIf
  3186. If $hp = 0 AND $maxhp > 0 Then
  3187. $hp = "Dead"
  3188. EndIf
  3189. EndFunc
  3190.  
  3191. Func updatetargetdata()
  3192. hpupdate()
  3193. $ptr = _memorymodulegetbaseaddress($ipid, "n3.dll") + 378048
  3194. $off1 = Dec("7c")
  3195. $off2 = Dec("50")
  3196. $off3 = Dec("17C")
  3197. $baseaddr = _memoryread($ptr, $handle)
  3198. $lvl1 = "0x" & Hex($baseaddr + $off1)
  3199. $baseaddr = _memoryread($lvl1, $handle)
  3200. $lvl2 = "0x" & Hex($baseaddr + $off2)
  3201. $baseaddr = _memoryread($lvl2, $handle)
  3202. $entrypoint = "0x" & Hex($baseaddr + $off3)
  3203. If "0x" & Hex(_memoryread($entrypoint, $handle)) <> $lasttarget Then
  3204. $lvl1 = leveluppointer($ptr, "0x7c")
  3205. $lvl2 = leveluppointer($lvl1, "0x50")
  3206. $lvl3 = leveluppointer($lvl2, "0x17C")
  3207. $lvl4 = leveluppointer($lvl3, "0x30")
  3208. $lvl5 = leveluppointer($lvl4, "0x120")
  3209. $lvl6 = leveluppointer($lvl5, "0x4")
  3210. $lvl7 = leveluppointer($lvl6, "0x358")
  3211. Global $targetnano = $lvl7
  3212. Global $lasttarget = "0x" & Hex(_memoryread($lvl3, $handle))
  3213. EndIf
  3214. EndFunc
  3215.  
  3216. Func leveluppointer($addr, $offset)
  3217. $val = _memoryread($addr, $handle)
  3218. Return "0x" & Hex($val + $offset)
  3219. EndFunc
  3220.  
  3221. Func _memoryopen($iv_pid, $iv_desiredaccess = 2035711, $iv_inherithandle = 1)
  3222. If NOT ProcessExists($iv_pid) Then
  3223. SetError(1)
  3224. Return 0
  3225. EndIf
  3226. Local $ah_handle[2] = [DllOpen("kernel32.dll")]
  3227. If @error Then
  3228. SetError(2)
  3229. Return 0
  3230. EndIf
  3231. Local $av_openprocess = DllCall($ah_handle[0], "int", "OpenProcess", "int", $iv_desiredaccess, "int", $iv_inherithandle, "int", $iv_pid)
  3232. If @error Then
  3233. DllClose($ah_handle[0])
  3234. SetError(3)
  3235. Return 0
  3236. EndIf
  3237. $ah_handle[1] = $av_openprocess[0]
  3238. Return $ah_handle
  3239. EndFunc
  3240.  
  3241. Func _memoryread($iv_address, $ah_handle, $sv_type = "dword")
  3242. If NOT IsArray($ah_handle) Then
  3243. SetError(1)
  3244. Return 0
  3245. EndIf
  3246. Local $v_buffer = DllStructCreate($sv_type)
  3247. If @error Then
  3248. SetError(@error + 1)
  3249. Return 0
  3250. EndIf
  3251. DllCall($ah_handle[0], "int", "ReadProcessMemory", "int", $ah_handle[1], "int", $iv_address, "ptr", DllStructGetPtr($v_buffer), "int", DllStructGetSize($v_buffer), "int", "")
  3252. If NOT @error Then
  3253. Local $v_value = DllStructGetData($v_buffer, 1)
  3254. Return $v_value
  3255. Else
  3256. SetError(6)
  3257. Return 0
  3258. EndIf
  3259. EndFunc
  3260.  
  3261. Func _memorywrite($iv_address, $ah_handle, $v_data, $sv_type = "dword")
  3262. If NOT IsArray($ah_handle) Then
  3263. SetError(1)
  3264. Return 0
  3265. EndIf
  3266. Local $v_buffer = DllStructCreate($sv_type)
  3267. If @error Then
  3268. SetError(@error + 1)
  3269. Return 0
  3270. Else
  3271. DllStructSetData($v_buffer, 1, $v_data)
  3272. If @error Then
  3273. SetError(6)
  3274. Return 0
  3275. EndIf
  3276. EndIf
  3277. DllCall($ah_handle[0], "int", "WriteProcessMemory", "int", $ah_handle[1], "int", $iv_address, "ptr", DllStructGetPtr($v_buffer), "int", DllStructGetSize($v_buffer), "int", "")
  3278. If NOT @error Then
  3279. Return 1
  3280. Else
  3281. SetError(7)
  3282. Return 0
  3283. EndIf
  3284. EndFunc
  3285.  
  3286. Func _memoryclose($ah_handle)
  3287. If NOT IsArray($ah_handle) Then
  3288. SetError(1)
  3289. Return 0
  3290. EndIf
  3291. DllCall($ah_handle[0], "int", "CloseHandle", "int", $ah_handle[1])
  3292. If NOT @error Then
  3293. DllClose($ah_handle[0])
  3294. Return 1
  3295. Else
  3296. DllClose($ah_handle[0])
  3297. SetError(2)
  3298. Return 0
  3299. EndIf
  3300. EndFunc
  3301.  
  3302. Func setprivilege($privilege, $benable)
  3303. Const $token_adjust_privileges = 32
  3304. Const $token_query = 8
  3305. Const $se_privilege_enabled = 2
  3306. Local $htoken, $sp_auxret, $sp_ret, $hcurrprocess, $ntokens, $ntokenindex, $priv
  3307. $ntokens = 1
  3308. $luid = DllStructCreate("dword;int")
  3309. If IsArray($privilege) Then $ntokens = UBound($privilege)
  3310. $token_privileges = DllStructCreate("dword;dword[" & (3 * $ntokens) & "]")
  3311. $newtoken_privileges = DllStructCreate("dword;dword[" & (3 * $ntokens) & "]")
  3312. $hcurrprocess = DllCall("kernel32.dll", "hwnd", "GetCurrentProcess")
  3313. $sp_auxret = DllCall("advapi32.dll", "int", "OpenProcessToken", "hwnd", $hcurrprocess[0], "int", BitOR($token_adjust_privileges, $token_query), "int_ptr", 0)
  3314. If $sp_auxret[0] Then
  3315. $htoken = $sp_auxret[3]
  3316. DllStructSetData($token_privileges, 1, 1)
  3317. $ntokenindex = 1
  3318. While $ntokenindex <= $ntokens
  3319. If IsArray($privilege) Then
  3320. $priv = $privilege[$ntokenindex - 1]
  3321. Else
  3322. $priv = $privilege
  3323. EndIf
  3324. $ret = DllCall("advapi32.dll", "int", "LookupPrivilegeValue", "str", "", "str", $priv, "ptr", DllStructGetPtr($luid))
  3325. If $ret[0] Then
  3326. If $benable Then
  3327. DllStructSetData($token_privileges, 2, $se_privilege_enabled, (3 * $ntokenindex))
  3328. Else
  3329. DllStructSetData($token_privileges, 2, 0, (3 * $ntokenindex))
  3330. EndIf
  3331. DllStructSetData($token_privileges, 2, DllStructGetData($luid, 1), (3 * ($ntokenindex - 1)) + 1)
  3332. DllStructSetData($token_privileges, 2, DllStructGetData($luid, 2), (3 * ($ntokenindex - 1)) + 2)
  3333. DllStructSetData($luid, 1, 0)
  3334. DllStructSetData($luid, 2, 0)
  3335. EndIf
  3336. $ntokenindex += 1
  3337. WEnd
  3338. $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)
  3339. $f = DllCall("kernel32.dll", "int", "GetLastError")
  3340. EndIf
  3341. $newtoken_privileges = 0
  3342. $token_privileges = 0
  3343. $luid = 0
  3344. If $sp_auxret[0] = 0 Then Return 0
  3345. $sp_auxret = DllCall("kernel32.dll", "int", "CloseHandle", "hwnd", $htoken)
  3346. If NOT $ret[0] AND NOT $sp_auxret[0] Then Return 0
  3347. Return $ret[0]
  3348. EndFunc
  3349.  
  3350. #EndRegion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement