Code:
#RequireAdmin
#Region
#AutoIt3Wrapper_Icon=c:\users\ahmed\downloads\egypt-flag-1.ico
#EndRegion
Global Const $bs_groupbox = 7
Global Const $bs_bottom = 2048
Global Const $bs_center = 768
Global Const $bs_defpushbutton = 1
Global Const $bs_left = 256
Global Const $bs_multiline = 8192
Global Const $bs_pushbox = 10
Global Const $bs_pushlike = 4096
Global Const $bs_right = 512
Global Const $bs_rightbutton = 32
Global Const $bs_top = 1024
Global Const $bs_vcenter = 3072
Global Const $bs_flat = 32768
Global Const $bs_icon = 64
Global Const $bs_bitmap = 128
Global Const $bs_notify = 16384
Global Const $bs_splitbutton = 12
Global Const $bs_defsplitbutton = 13
Global Const $bs_commandlink = 14
Global Const $bs_defcommandlink = 15
Global Const $bcsif_glyph = 1
Global Const $bcsif_image = 2
Global Const $bcsif_style = 4
Global Const $bcsif_size = 8
Global Const $bcss_nosplit = 1
Global Const $bcss_stretch = 2
Global Const $bcss_alignleft = 4
Global Const $bcss_image = 8
Global Const $button_imagelist_align_left = 0
Global Const $button_imagelist_align_right = 1
Global Const $button_imagelist_align_top = 2
Global Const $button_imagelist_align_bottom = 3
Global Const $button_imagelist_align_center = 4
Global Const $bs_3state = 5
Global Const $bs_auto3state = 6
Global Const $bs_autocheckbox = 3
Global Const $bs_checkbox = 2
Global Const $bs_radiobutton = 4
Global Const $bs_autoradiobutton = 9
Global Const $bs_ownerdraw = 11
Global Const $gui_ss_default_button = 0
Global Const $gui_ss_default_checkbox = 0
Global Const $gui_ss_default_group = 0
Global Const $gui_ss_default_radio = 0
Global Const $bcm_first = 5632
Global Const $bcm_getidealsize = ($bcm_first + 1)
Global Const $bcm_getimagelist = ($bcm_first + 3)
Global Const $bcm_getnote = ($bcm_first + 10)
Global Const $bcm_getnotelength = ($bcm_first + 11)
Global Const $bcm_getsplitinfo = ($bcm_first + 8)
Global Const $bcm_gettextmargin = ($bcm_first + 5)
Global Const $bcm_setdropdownstate = ($bcm_first + 6)
Global Const $bcm_setimagelist = ($bcm_first + 2)
Global Const $bcm_setnote = ($bcm_first + 9)
Global Const $bcm_setshield = ($bcm_first + 12)
Global Const $bcm_setsplitinfo = ($bcm_first + 7)
Global Const $bcm_settextmargin = ($bcm_first + 4)
Global Const $bm_click = 245
Global Const $bm_getcheck = 240
Global Const $bm_getimage = 246
Global Const $bm_getstate = 242
Global Const $bm_setcheck = 241
Global Const $bm_setdontclick = 248
Global Const $bm_setimage = 247
Global Const $bm_setstate = 243
Global Const $bm_setstyle = 244
Global Const $bcn_first = -1250
Global Const $bcn_dropdown = ($bcn_first + 2)
Global Const $bcn_hotitemchange = ($bcn_first + 1)
Global Const $bn_clicked = 0
Global Const $bn_paint = 1
Global Const $bn_hilite = 2
Global Const $bn_unhilite = 3
Global Const $bn_disable = 4
Global Const $bn_doubleclicked = 5
Global Const $bn_setfocus = 6
Global Const $bn_killfocus = 7
Global Const $bn_pushed = $bn_hilite
Global Const $bn_unpushed = $bn_unhilite
Global Const $bn_dblclk = $bn_doubleclicked
Global Const $bst_checked = 1
Global Const $bst_indeterminate = 2
Global Const $bst_unchecked = 0
Global Const $bst_focus = 8
Global Const $bst_pushed = 4
Global Const $bst_dontclick = 128
Global Const $cb_err = -1
Global Const $cb_errattribute = -3
Global Const $cb_errrequired = -4
Global Const $cb_errspace = -2
Global Const $cb_okay = 0
Global Const $state_system_invisible = 32768
Global Const $state_system_pressed = 8
Global Const $cbs_autohscroll = 64
Global Const $cbs_disablenoscroll = 2048
Global Const $cbs_dropdown = 2
Global Const $cbs_dropdownlist = 3
Global Const $cbs_hasstrings = 512
Global Const $cbs_lowercase = 16384
Global Const $cbs_nointegralheight = 1024
Global Const $cbs_oemconvert = 128
Global Const $cbs_ownerdrawfixed = 16
Global Const $cbs_ownerdrawvariable = 32
Global Const $cbs_simple = 1
Global Const $cbs_sort = 256
Global Const $cbs_uppercase = 8192
Global Const $cbm_first = 5888
Global Const $cb_addstring = 323
Global Const $cb_deletestring = 324
Global Const $cb_dir = 325
Global Const $cb_findstring = 332
Global Const $cb_findstringexact = 344
Global Const $cb_getcomboboxinfo = 356
Global Const $cb_getcount = 326
Global Const $cb_getcuebanner = ($cbm_first + 4)
Global Const $cb_getcursel = 327
Global Const $cb_getdroppedcontrolrect = 338
Global Const $cb_getdroppedstate = 343
Global Const $cb_getdroppedwidth = 351
Global Const $cb_geteditsel = 320
Global Const $cb_getextendedui = 342
Global Const $cb_gethorizontalextent = 349
Global Const $cb_getitemdata = 336
Global Const $cb_getitemheight = 340
Global Const $cb_getlbtext = 328
Global Const $cb_getlbtextlen = 329
Global Const $cb_getlocale = 346
Global Const $cb_getminvisible = 5890
Global Const $cb_gettopindex = 347
Global Const $cb_initstorage = 353
Global Const $cb_limittext = 321
Global Const $cb_resetcontent = 331
Global Const $cb_insertstring = 330
Global Const $cb_selectstring = 333
Global Const $cb_setcuebanner = ($cbm_first + 3)
Global Const $cb_setcursel = 334
Global Const $cb_setdroppedwidth = 352
Global Const $cb_seteditsel = 322
Global Const $cb_setextendedui = 341
Global Const $cb_sethorizontalextent = 350
Global Const $cb_setitemdata = 337
Global Const $cb_setitemheight = 339
Global Const $cb_setlocale = 345
Global Const $cb_setminvisible = 5889
Global Const $cb_settopindex = 348
Global Const $cb_showdropdown = 335
Global Const $cbn_closeup = 8
Global Const $cbn_dblclk = 2
Global Const $cbn_dropdown = 7
Global Const $cbn_editchange = 5
Global Const $cbn_editupdate = 6
Global Const $cbn_errspace = (-1)
Global Const $cbn_killfocus = 4
Global Const $cbn_selchange = 1
Global Const $cbn_selendcancel = 10
Global Const $cbn_selendok = 9
Global Const $cbn_setfocus = 3
Global Const $cbes_ex_casesensitive = 16
Global Const $cbes_ex_noeditimage = 1
Global Const $cbes_ex_noeditimageindent = 2
Global Const $cbes_ex_nosizelimit = 8
Global Const $__comboboxconstant_wm_user = 1024
Global Const $cbem_deleteitem = $cb_deletestring
Global Const $cbem_getcombocontrol = ($__comboboxconstant_wm_user + 6)
Global Const $cbem_geteditcontrol = ($__comboboxconstant_wm_user + 7)
Global Const $cbem_getexstyle = ($__comboboxconstant_wm_user + 9)
Global Const $cbem_getextendedstyle = ($__comboboxconstant_wm_user + 9)
Global Const $cbem_getimagelist = ($__comboboxconstant_wm_user + 3)
Global Const $cbem_getitema = ($__comboboxconstant_wm_user + 4)
Global Const $cbem_getitemw = ($__comboboxconstant_wm_user + 13)
Global Const $cbem_getunicodeformat = 8192 + 6
Global Const $cbem_haseditchanged = ($__comboboxconstant_wm_user + 10)
Global Const $cbem_insertitema = ($__comboboxconstant_wm_user + 1)
Global Const $cbem_insertitemw = ($__comboboxconstant_wm_user + 11)
Global Const $cbem_setexstyle = ($__comboboxconstant_wm_user + 8)
Global Const $cbem_setextendedstyle = ($__comboboxconstant_wm_user + 14)
Global Const $cbem_setimagelist = ($__comboboxconstant_wm_user + 2)
Global Const $cbem_setitema = ($__comboboxconstant_wm_user + 5)
Global Const $cbem_setitemw = ($__comboboxconstant_wm_user + 12)
Global Const $cbem_setunicodeformat = 8192 + 5
Global Const $cbem_setwindowtheme = 8192 + 11
Global Const $cben_first = (-800)
Global Const $cben_last = (-830)
Global Const $cben_beginedit = ($cben_first - 4)
Global Const $cben_deleteitem = ($cben_first - 2)
Global Const $cben_dragbegina = ($cben_first - 8)
Global Const $cben_dragbeginw = ($cben_first - 9)
Global Const $cben_endedita = ($cben_first - 5)
Global Const $cben_endeditw = ($cben_first - 6)
Global Const $cben_getdispinfo = ($cben_first - 0)
Global Const $cben_getdispinfoa = ($cben_first - 0)
Global Const $cben_getdispinfow = ($cben_first - 7)
Global Const $cben_insertitem = ($cben_first - 1)
Global Const $cbeif_di_setitem = 268435456
Global Const $cbeif_image = 2
Global Const $cbeif_indent = 16
Global Const $cbeif_lparam = 32
Global Const $cbeif_overlay = 8
Global Const $cbeif_selectedimage = 4
Global Const $cbeif_text = 1
Global Const $__comboboxconstant_ws_vscroll = 2097152
Global Const $gui_ss_default_combo = BitOR($cbs_dropdown, $cbs_autohscroll, $__comboboxconstant_ws_vscroll)
Global Const $es_left = 0
Global Const $es_center = 1
Global Const $es_right = 2
Global Const $es_multiline = 4
Global Const $es_uppercase = 8
Global Const $es_lowercase = 16
Global Const $es_password = 32
Global Const $es_autovscroll = 64
Global Const $es_autohscroll = 128
Global Const $es_nohidesel = 256
Global Const $es_oemconvert = 1024
Global Const $es_readonly = 2048
Global Const $es_wantreturn = 4096
Global Const $es_number = 8192
Global Const $ec_err = -1
Global Const $ecm_first = 5376
Global Const $em_canundo = 198
Global Const $em_charfrompos = 215
Global Const $em_emptyundobuffer = 205
Global Const $em_fmtlines = 200
Global Const $em_getcuebanner = ($ecm_first + 2)
Global Const $em_getfirstvisibleline = 206
Global Const $em_gethandle = 189
Global Const $em_getimestatus = 217
Global Const $em_getlimittext = 213
Global Const $em_getline = 196
Global Const $em_getlinecount = 186
Global Const $em_getmargins = 212
Global Const $em_getmodify = 184
Global Const $em_getpasswordchar = 210
Global Const $em_getrect = 178
Global Const $em_getsel = 176
Global Const $em_getthumb = 190
Global Const $em_getwordbreakproc = 209
Global Const $em_hideballoontip = ($ecm_first + 4)
Global Const $em_limittext = 197
Global Const $em_linefromchar = 201
Global Const $em_lineindex = 187
Global Const $em_linelength = 193
Global Const $em_linescroll = 182
Global Const $em_posfromchar = 214
Global Const $em_replacesel = 194
Global Const $em_scroll = 181
Global Const $em_scrollcaret = 183
Global Const $em_setcuebanner = ($ecm_first + 1)
Global Const $em_sethandle = 188
Global Const $em_setimestatus = 216
Global Const $em_setlimittext = $em_limittext
Global Const $em_setmargins = 211
Global Const $em_setmodify = 185
Global Const $em_setpasswordchar = 204
Global Const $em_setreadonly = 207
Global Const $em_setrect = 179
Global Const $em_setrectnp = 180
Global Const $em_setsel = 177
Global Const $em_settabstops = 203
Global Const $em_setwordbreakproc = 208
Global Const $em_showballoontip = ($ecm_first + 3)
Global Const $em_undo = 199
Global Const $ec_leftmargin = 1
Global Const $ec_rightmargin = 2
Global Const $ec_usefontinfo = 65535
Global Const $emsis_compositionstring = 1
Global Const $eimes_getcompstratonce = 1
Global Const $eimes_cancelcompstrinfocus = 2
Global Const $eimes_completecompstrkillfocus = 4
Global Const $en_align_ltr_ec = 1792
Global Const $en_align_rtl_ec = 1793
Global Const $en_change = 768
Global Const $en_errspace = 1280
Global Const $en_hscroll = 1537
Global Const $en_killfocus = 512
Global Const $en_maxtext = 1281
Global Const $en_setfocus = 256
Global Const $en_update = 1024
Global Const $en_vscroll = 1538
Global Const $tti_none = 0
Global Const $tti_info = 1
Global Const $tti_warning = 2
Global Const $tti_error = 3
Global Const $tti_info_large = 4
Global Const $tti_warning_large = 5
Global Const $tti_error_large = 6
Global Const $__editconstant_ws_vscroll = 2097152
Global Const $__editconstant_ws_hscroll = 1048576
Global Const $gui_ss_default_edit = BitOR($es_wantreturn, $__editconstant_ws_vscroll, $__editconstant_ws_hscroll, $es_autovscroll, $es_autohscroll)
Global Const $gui_ss_default_input = BitOR($es_left, $es_autohscroll)
Global Const $gui_event_close = -3
Global Const $gui_event_minimize = -4
Global Const $gui_event_restore = -5
Global Const $gui_event_maximize = -6
Global Const $gui_event_primarydown = -7
Global Const $gui_event_primaryup = -8
Global Const $gui_event_secondarydown = -9
Global Const $gui_event_secondaryup = -10
Global Const $gui_event_mousemove = -11
Global Const $gui_event_resized = -12
Global Const $gui_event_dropped = -13
Global Const $gui_rundefmsg = "GUI_RUNDEFMSG"
Global Const $gui_avistop = 0
Global Const $gui_avistart = 1
Global Const $gui_aviclose = 2
Global Const $gui_checked = 1
Global Const $gui_indeterminate = 2
Global Const $gui_unchecked = 4
Global Const $gui_dropaccepted = 8
Global Const $gui_nodropaccepted = 4096
Global Const $gui_acceptfiles = $gui_dropaccepted
Global Const $gui_show = 16
Global Const $gui_hide = 32
Global Const $gui_enable = 64
Global Const $gui_disable = 128
Global Const $gui_focus = 256
Global Const $gui_nofocus = 8192
Global Const $gui_defbutton = 512
Global Const $gui_expand = 1024
Global Const $gui_ontop = 2048
Global Const $gui_fontitalic = 2
Global Const $gui_fontunder = 4
Global Const $gui_fontstrike = 8
Global Const $gui_dockauto = 1
Global Const $gui_dockleft = 2
Global Const $gui_dockright = 4
Global Const $gui_dockhcenter = 8
Global Const $gui_docktop = 32
Global Const $gui_dockbottom = 64
Global Const $gui_dockvcenter = 128
Global Const $gui_dockwidth = 256
Global Const $gui_dockheight = 512
Global Const $gui_docksize = 768
Global Const $gui_dockmenubar = 544
Global Const $gui_dockstatebar = 576
Global Const $gui_dockall = 802
Global Const $gui_dockborders = 102
Global Const $gui_gr_close = 1
Global Const $gui_gr_line = 2
Global Const $gui_gr_bezier = 4
Global Const $gui_gr_move = 6
Global Const $gui_gr_color = 8
Global Const $gui_gr_rect = 10
Global Const $gui_gr_ellipse = 12
Global Const $gui_gr_pie = 14
Global Const $gui_gr_dot = 16
Global Const $gui_gr_pixel = 18
Global Const $gui_gr_hint = 20
Global Const $gui_gr_refresh = 22
Global Const $gui_gr_pensize = 24
Global Const $gui_gr_nobkcolor = -2
Global Const $gui_bkcolor_default = -1
Global Const $gui_bkcolor_transparent = -2
Global Const $gui_bkcolor_lv_alternate = -33554432
Global Const $gui_ws_ex_parentdrag = 1048576
Global Const $tbs_autoticks = 1
Global Const $tbs_both = 8
Global Const $tbs_bottom = 0
Global Const $tbs_downisleft = 1024
Global Const $tbs_enableselrange = 32
Global Const $tbs_fixedlength = 64
Global Const $tbs_horz = 0
Global Const $tbs_left = 4
Global Const $tbs_nothumb = 128
Global Const $tbs_noticks = 16
Global Const $tbs_reversed = 512
Global Const $tbs_right = 0
Global Const $tbs_top = 4
Global Const $tbs_tooltips = 256
Global Const $tbs_vert = 2
Global Const $gui_ss_default_slider = $tbs_autoticks
Global Const $tbcd_channel = 3
Global Const $tbcd_thumb = 2
Global Const $tbcd_tics = 1
Global Const $__sliderconstant_wm_user = 1024
Global Const $tbm_clearsel = $__sliderconstant_wm_user + 19
Global Const $tbm_cleartics = $__sliderconstant_wm_user + 9
Global Const $tbm_getbuddy = $__sliderconstant_wm_user + 33
Global Const $tbm_getchannelrect = $__sliderconstant_wm_user + 26
Global Const $tbm_getlinesize = $__sliderconstant_wm_user + 24
Global Const $tbm_getnumtics = $__sliderconstant_wm_user + 16
Global Const $tbm_getpagesize = $__sliderconstant_wm_user + 22
Global Const $tbm_getpos = $__sliderconstant_wm_user
Global Const $tbm_getptics = $__sliderconstant_wm_user + 14
Global Const $tbm_getselend = $__sliderconstant_wm_user + 18
Global Const $tbm_getselstart = $__sliderconstant_wm_user + 17
Global Const $tbm_getrangemax = $__sliderconstant_wm_user + 2
Global Const $tbm_getrangemin = $__sliderconstant_wm_user + 1
Global Const $tbm_getthumblength = $__sliderconstant_wm_user + 28
Global Const $tbm_getthumbrect = $__sliderconstant_wm_user + 25
Global Const $tbm_gettic = $__sliderconstant_wm_user + 3
Global Const $tbm_getticpos = $__sliderconstant_wm_user + 15
Global Const $tbm_gettooltips = $__sliderconstant_wm_user + 30
Global Const $tbm_getunicodeformat = 8192 + 6
Global Const $tbm_setbuddy = $__sliderconstant_wm_user + 32
Global Const $tbm_setlinesize = $__sliderconstant_wm_user + 23
Global Const $tbm_setpagesize = $__sliderconstant_wm_user + 21
Global Const $tbm_setpos = $__sliderconstant_wm_user + 5
Global Const $tbm_setrange = $__sliderconstant_wm_user + 6
Global Const $tbm_setrangemax = $__sliderconstant_wm_user + 8
Global Const $tbm_setrangemin = $__sliderconstant_wm_user + 7
Global Const $tbm_setsel = $__sliderconstant_wm_user + 10
Global Const $tbm_setselend = $__sliderconstant_wm_user + 12
Global Const $tbm_setselstart = $__sliderconstant_wm_user + 11
Global Const $tbm_setthumblength = $__sliderconstant_wm_user + 27
Global Const $tbm_settic = $__sliderconstant_wm_user + 4
Global Const $tbm_setticfreq = $__sliderconstant_wm_user + 20
Global Const $tbm_settipside = $__sliderconstant_wm_user + 31
Global Const $tbm_settooltips = $__sliderconstant_wm_user + 29
Global Const $tbm_setunicodeformat = 8192 + 5
Global Const $tbts_bottom = 2
Global Const $tbts_left = 1
Global Const $tbts_right = 3
Global Const $tbts_top = 0
Global Const $ss_left = 0
Global Const $ss_center = 1
Global Const $ss_right = 2
Global Const $ss_icon = 3
Global Const $ss_blackrect = 4
Global Const $ss_grayrect = 5
Global Const $ss_whiterect = 6
Global Const $ss_blackframe = 7
Global Const $ss_grayframe = 8
Global Const $ss_whiteframe = 9
Global Const $ss_simple = 11
Global Const $ss_leftnowordwrap = 12
Global Const $ss_bitmap = 14
Global Const $ss_etchedhorz = 16
Global Const $ss_etchedvert = 17
Global Const $ss_etchedframe = 18
Global Const $ss_noprefix = 128
Global Const $ss_notify = 256
Global Const $ss_centerimage = 512
Global Const $ss_rightjust = 1024
Global Const $ss_sunken = 4096
Global Const $gui_ss_default_label = 0
Global Const $gui_ss_default_graphic = 0
Global Const $gui_ss_default_icon = $ss_notify
Global Const $gui_ss_default_pic = $ss_notify
Global Const $ws_tiled = 0
Global Const $ws_overlapped = 0
Global Const $ws_maximizebox = 65536
Global Const $ws_minimizebox = 131072
Global Const $ws_tabstop = 65536
Global Const $ws_group = 131072
Global Const $ws_sizebox = 262144
Global Const $ws_thickframe = 262144
Global Const $ws_sysmenu = 524288
Global Const $ws_hscroll = 1048576
Global Const $ws_vscroll = 2097152
Global Const $ws_dlgframe = 4194304
Global Const $ws_border = 8388608
Global Const $ws_caption = 12582912
Global Const $ws_overlappedwindow = 13565952
Global Const $ws_tiledwindow = 13565952
Global Const $ws_maximize = 16777216
Global Const $ws_clipchildren = 33554432
Global Const $ws_clipsiblings = 67108864
Global Const $ws_disabled = 134217728
Global Const $ws_visible = 268435456
Global Const $ws_minimize = 536870912
Global Const $ws_child = 1073741824
Global Const $ws_popup = -2147483648
Global Const $ws_popupwindow = -2138570752
Global Const $ds_modalframe = 128
Global Const $ds_setforeground = 512
Global Const $ds_contexthelp = 8192
Global Const $ws_ex_acceptfiles = 16
Global Const $ws_ex_mdichild = 64
Global Const $ws_ex_appwindow = 262144
Global Const $ws_ex_composited = 33554432
Global Const $ws_ex_clientedge = 512
Global Const $ws_ex_contexthelp = 1024
Global Const $ws_ex_dlgmodalframe = 1
Global Const $ws_ex_leftscrollbar = 16384
Global Const $ws_ex_overlappedwindow = 768
Global Const $ws_ex_right = 4096
Global Const $ws_ex_staticedge = 131072
Global Const $ws_ex_toolwindow = 128
Global Const $ws_ex_topmost = 8
Global Const $ws_ex_transparent = 32
Global Const $ws_ex_windowedge = 256
Global Const $ws_ex_layered = 524288
Global Const $ws_ex_controlparent = 65536
Global Const $ws_ex_layoutrtl = 4194304
Global Const $ws_ex_rtlreading = 8192
Global Const $wm_gettextlength = 14
Global Const $wm_gettext = 13
Global Const $wm_size = 5
Global Const $wm_sizing = 532
Global Const $wm_user = 1024
Global Const $wm_create = 1
Global Const $wm_destroy = 2
Global Const $wm_move = 3
Global Const $wm_activate = 6
Global Const $wm_setfocus = 7
Global Const $wm_killfocus = 8
Global Const $wm_enable = 10
Global Const $wm_setredraw = 11
Global Const $wm_settext = 12
Global Const $wm_paint = 15
Global Const $wm_close = 16
Global Const $wm_queryendsession = 17
Global Const $wm_quit = 18
Global Const $wm_erasebkgnd = 20
Global Const $wm_queryopen = 19
Global Const $wm_syscolorchange = 21
Global Const $wm_endsession = 22
Global Const $wm_showwindow = 24
Global Const $wm_settingchange = 26
Global Const $wm_wininichange = 26
Global Const $wm_devmodechange = 27
Global Const $wm_activateapp = 28
Global Const $wm_fontchange = 29
Global Const $wm_timechange = 30
Global Const $wm_cancelmode = 31
Global Const $wm_ime_startcomposition = 269
Global Const $wm_ime_endcomposition = 270
Global Const $wm_ime_composition = 271
Global Const $wm_ime_keylast = 271
Global Const $wm_setcursor = 32
Global Const $wm_mouseactivate = 33
Global Const $wm_childactivate = 34
Global Const $wm_queuesync = 35
Global Const $wm_getminmaxinfo = 36
Global Const $wm_painticon = 38
Global Const $wm_iconerasebkgnd = 39
Global Const $wm_nextdlgctl = 40
Global Const $wm_spoolerstatus = 42
Global Const $wm_drawitem = 43
Global Const $wm_measureitem = 44
Global Const $wm_deleteitem = 45
Global Const $wm_vkeytoitem = 46
Global Const $wm_chartoitem = 47
Global Const $wm_setfont = 48
Global Const $wm_getfont = 49
Global Const $wm_sethotkey = 50
Global Const $wm_gethotkey = 51
Global Const $wm_querydragicon = 55
Global Const $wm_compareitem = 57
Global Const $wm_getobject = 61
Global Const $wm_compacting = 65
Global Const $wm_commnotify = 68
Global Const $wm_windowposchanging = 70
Global Const $wm_windowposchanged = 71
Global Const $wm_power = 72
Global Const $wm_notify = 78
Global Const $wm_copydata = 74
Global Const $wm_canceljournal = 75
Global Const $wm_inputlangchangerequest = 80
Global Const $wm_inputlangchange = 81
Global Const $wm_tcard = 82
Global Const $wm_help = 83
Global Const $wm_userchanged = 84
Global Const $wm_notifyformat = 85
Global Const $wm_parentnotify = 528
Global Const $wm_entermenuloop = 529
Global Const $wm_exitmenuloop = 530
Global Const $wm_nextmenu = 531
Global Const $wm_capturechanged = 533
Global Const $wm_moving = 534
Global Const $wm_powerbroadcast = 536
Global Const $wm_devicechange = 537
Global Const $wm_mdicreate = 544
Global Const $wm_mdidestroy = 545
Global Const $wm_mdiactivate = 546
Global Const $wm_mdirestore = 547
Global Const $wm_mdinext = 548
Global Const $wm_mdimaximize = 549
Global Const $wm_mditile = 550
Global Const $wm_mdicascade = 551
Global Const $wm_mdiiconarrange = 552
Global Const $wm_mdigetactive = 553
Global Const $wm_mdisetmenu = 560
Global Const $wm_entersizemove = 561
Global Const $wm_exitsizemove = 562
Global Const $wm_dropfiles = 563
Global Const $wm_mdirefreshmenu = 564
Global Const $wm_ime_setcontext = 641
Global Const $wm_ime_notify = 642
Global Const $wm_ime_control = 643
Global Const $wm_ime_compositionfull = 644
Global Const $wm_ime_select = 645
Global Const $wm_ime_char = 646
Global Const $wm_ime_request = 648
Global Const $wm_ime_keydown = 656
Global Const $wm_ime_keyup = 657
Global Const $wm_ncmousehover = 672
Global Const $wm_mousehover = 673
Global Const $wm_ncmouseleave = 674
Global Const $wm_mouseleave = 675
Global Const $wm_wtssession_change = 689
Global Const $wm_tablet_first = 704
Global Const $wm_tablet_last = 735
Global Const $wm_cut = 768
Global Const $wm_copy = 769
Global Const $wm_paste = 770
Global Const $wm_clear = 771
Global Const $wm_undo = 772
Global Const $wm_paletteischanging = 784
Global Const $wm_hotkey = 786
Global Const $wm_palettechanged = 785
Global Const $wm_print = 791
Global Const $wm_printclient = 792
Global Const $wm_appcommand = 793
Global Const $wm_querynewpalette = 783
Global Const $wm_themechanged = 794
Global Const $wm_handheldfirst = 856
Global Const $wm_handheldlast = 863
Global Const $wm_afxfirst = 864
Global Const $wm_afxlast = 895
Global Const $wm_penwinfirst = 896
Global Const $wm_penwinlast = 911
Global Const $wm_contextmenu = 123
Global Const $wm_stylechanging = 124
Global Const $wm_stylechanged = 125
Global Const $wm_displaychange = 126
Global Const $wm_geticon = 127
Global Const $wm_seticon = 128
Global Const $wm_nccreate = 129
Global Const $wm_ncdestroy = 130
Global Const $wm_nccalcsize = 131
Global Const $wm_nchittest = 132
Global Const $wm_ncpaint = 133
Global Const $wm_ncactivate = 134
Global Const $wm_getdlgcode = 135
Global Const $wm_syncpaint = 136
Global Const $wm_ncmousemove = 160
Global Const $wm_nclbuttondown = 161
Global Const $wm_nclbuttonup = 162
Global Const $wm_nclbuttondblclk = 163
Global Const $wm_ncrbuttondown = 164
Global Const $wm_ncrbuttonup = 165
Global Const $wm_ncrbuttondblclk = 166
Global Const $wm_ncmbuttondown = 167
Global Const $wm_ncmbuttonup = 168
Global Const $wm_ncmbuttondblclk = 169
Global Const $wm_ncxbuttondown = 171
Global Const $wm_ncxbuttonup = 172
Global Const $wm_ncxbuttondblclk = 173
Global Const $wm_keydown = 256
Global Const $wm_keyfirst = 256
Global Const $wm_keyup = 257
Global Const $wm_char = 258
Global Const $wm_deadchar = 259
Global Const $wm_syskeydown = 260
Global Const $wm_syskeyup = 261
Global Const $wm_syschar = 262
Global Const $wm_sysdeadchar = 263
Global Const $wm_keylast = 265
Global Const $wm_unichar = 265
Global Const $wm_initdialog = 272
Global Const $wm_command = 273
Global Const $wm_syscommand = 274
Global Const $wm_timer = 275
Global Const $wm_hscroll = 276
Global Const $wm_vscroll = 277
Global Const $wm_initmenu = 278
Global Const $wm_initmenupopup = 279
Global Const $wm_menuselect = 287
Global Const $wm_menuchar = 288
Global Const $wm_enteridle = 289
Global Const $wm_menurbuttonup = 290
Global Const $wm_menudrag = 291
Global Const $wm_menugetobject = 292
Global Const $wm_uninitmenupopup = 293
Global Const $wm_menucommand = 294
Global Const $wm_changeuistate = 295
Global Const $wm_updateuistate = 296
Global Const $wm_queryuistate = 297
Global Const $wm_ctlcolormsgbox = 306
Global Const $wm_ctlcoloredit = 307
Global Const $wm_ctlcolorlistbox = 308
Global Const $wm_ctlcolorbtn = 309
Global Const $wm_ctlcolordlg = 310
Global Const $wm_ctlcolorscrollbar = 311
Global Const $wm_ctlcolorstatic = 312
Global Const $wm_ctlcolor = 25
Global Const $mn_gethmenu = 481
Global Const $wm_app = 32768
Global Const $nm_first = 0
Global Const $nm_outofmemory = $nm_first - 1
Global Const $nm_click = $nm_first - 2
Global Const $nm_dblclk = $nm_first - 3
Global Const $nm_return = $nm_first - 4
Global Const $nm_rclick = $nm_first - 5
Global Const $nm_rdblclk = $nm_first - 6
Global Const $nm_setfocus = $nm_first - 7
Global Const $nm_killfocus = $nm_first - 8
Global Const $nm_customdraw = $nm_first - 12
Global Const $nm_hover = $nm_first - 13
Global Const $nm_nchittest = $nm_first - 14
Global Const $nm_keydown = $nm_first - 15
Global Const $nm_releasedcapture = $nm_first - 16
Global Const $nm_setcursor = $nm_first - 17
Global Const $nm_char = $nm_first - 18
Global Const $nm_tooltipscreated = $nm_first - 19
Global Const $nm_ldown = $nm_first - 20
Global Const $nm_rdown = $nm_first - 21
Global Const $nm_themechanged = $nm_first - 22
Global Const $wm_mousefirst = 512
Global Const $wm_mousemove = 512
Global Const $wm_lbuttondown = 513
Global Const $wm_lbuttonup = 514
Global Const $wm_lbuttondblclk = 515
Global Const $wm_rbuttondown = 516
Global Const $wm_rbuttonup = 517
Global Const $wm_rbuttondblclk = 518
Global Const $wm_mbuttondown = 519
Global Const $wm_mbuttonup = 520
Global Const $wm_mbuttondblclk = 521
Global Const $wm_mousewheel = 522
Global Const $wm_xbuttondown = 523
Global Const $wm_xbuttonup = 524
Global Const $wm_xbuttondblclk = 525
Global Const $wm_mousehwheel = 526
Global Const $ps_solid = 0
Global Const $ps_dash = 1
Global Const $ps_dot = 2
Global Const $ps_dashdot = 3
Global Const $ps_dashdotdot = 4
Global Const $ps_null = 5
Global Const $ps_insideframe = 6
Global Const $lwa_alpha = 2
Global Const $lwa_colorkey = 1
Global Const $rgn_and = 1
Global Const $rgn_or = 2
Global Const $rgn_xor = 3
Global Const $rgn_diff = 4
Global Const $rgn_copy = 5
Global Const $errorregion = 0
Global Const $nullregion = 1
Global Const $simpleregion = 2
Global Const $complexregion = 3
Global Const $transparent = 1
Global Const $opaque = 2
Global Const $ccm_first = 8192
Global Const $ccm_getunicodeformat = ($ccm_first + 6)
Global Const $ccm_setunicodeformat = ($ccm_first + 5)
Global Const $ccm_setbkcolor = $ccm_first + 1
Global Const $ccm_setcolorscheme = $ccm_first + 2
Global Const $ccm_getcolorscheme = $ccm_first + 3
Global Const $ccm_getdroptarget = $ccm_first + 4
Global Const $ccm_setwindowtheme = $ccm_first + 11
Global Const $ga_parent = 1
Global Const $ga_root = 2
Global Const $ga_rootowner = 3
Global Const $sm_cxscreen = 0
Global Const $sm_cyscreen = 1
Global Const $sm_cxvscroll = 2
Global Const $sm_cyhscroll = 3
Global Const $sm_cycaption = 4
Global Const $sm_cxborder = 5
Global Const $sm_cyborder = 6
Global Const $sm_cxdlgframe = 7
Global Const $sm_cydlgframe = 8
Global Const $sm_cyvthumb = 9
Global Const $sm_cxhthumb = 10
Global Const $sm_cxicon = 11
Global Const $sm_cyicon = 12
Global Const $sm_cxcursor = 13
Global Const $sm_cycursor = 14
Global Const $sm_cymenu = 15
Global Const $sm_cxfullscreen = 16
Global Const $sm_cyfullscreen = 17
Global Const $sm_cykanjiwindow = 18
Global Const $sm_mousepresent = 19
Global Const $sm_cyvscroll = 20
Global Const $sm_cxhscroll = 21
Global Const $sm_debug = 22
Global Const $sm_swapbutton = 23
Global Const $sm_reserved1 = 24
Global Const $sm_reserved2 = 25
Global Const $sm_reserved3 = 26
Global Const $sm_reserved4 = 27
Global Const $sm_cxmin = 28
Global Const $sm_cymin = 29
Global Const $sm_cxsize = 30
Global Const $sm_cysize = 31
Global Const $sm_cxframe = 32
Global Const $sm_cyframe = 33
Global Const $sm_cxmintrack = 34
Global Const $sm_cymintrack = 35
Global Const $sm_cxdoubleclk = 36
Global Const $sm_cydoubleclk = 37
Global Const $sm_cxiconspacing = 38
Global Const $sm_cyiconspacing = 39
Global Const $sm_menudropalignment = 40
Global Const $sm_penwindows = 41
Global Const $sm_dbcsenabled = 42
Global Const $sm_cmousebuttons = 43
Global Const $sm_secure = 44
Global Const $sm_cxedge = 45
Global Const $sm_cyedge = 46
Global Const $sm_cxminspacing = 47
Global Const $sm_cyminspacing = 48
Global Const $sm_cxsmicon = 49
Global Const $sm_cysmicon = 50
Global Const $sm_cysmcaption = 51
Global Const $sm_cxsmsize = 52
Global Const $sm_cysmsize = 53
Global Const $sm_cxmenusize = 54
Global Const $sm_cymenusize = 55
Global Const $sm_arrange = 56
Global Const $sm_cxminimized = 57
Global Const $sm_cyminimized = 58
Global Const $sm_cxmaxtrack = 59
Global Const $sm_cymaxtrack = 60
Global Const $sm_cxmaximized = 61
Global Const $sm_cymaximized = 62
Global Const $sm_network = 63
Global Const $sm_cleanboot = 67
Global Const $sm_cxdrag = 68
Global Const $sm_cydrag = 69
Global Const $sm_showsounds = 70
Global Const $sm_cxmenucheck = 71
Global Const $sm_cymenucheck = 72
Global Const $sm_slowmachine = 73
Global Const $sm_mideastenabled = 74
Global Const $sm_mousewheelpresent = 75
Global Const $sm_xvirtualscreen = 76
Global Const $sm_yvirtualscreen = 77
Global Const $sm_cxvirtualscreen = 78
Global Const $sm_cyvirtualscreen = 79
Global Const $sm_cmonitors = 80
Global Const $sm_samedisplayformat = 81
Global Const $sm_immenabled = 82
Global Const $sm_cxfocusborder = 83
Global Const $sm_cyfocusborder = 84
Global Const $sm_tabletpc = 86
Global Const $sm_mediacenter = 87
Global Const $sm_starter = 88
Global Const $sm_serverr2 = 89
Global Const $sm_cmetrics = 90
Global Const $sm_remotesession = 4096
Global Const $sm_shuttingdown = 8192
Global Const $sm_remotecontrol = 8193
Global Const $sm_caretblinkingenabled = 8194
Global Const $blackness = 66
Global Const $captureblt = 1073741824
Global Const $dstinvert = 5570569
Global Const $mergecopy = 12583114
Global Const $mergepaint = 12255782
Global Const $nomirrorbitmap = -2147483648
Global Const $notsrccopy = 3342344
Global Const $notsrcerase = 1114278
Global Const $patcopy = 15728673
Global Const $patinvert = 5898313
Global Const $patpaint = 16452105
Global Const $srcand = 8913094
Global Const $srccopy = 13369376
Global Const $srcerase = 4457256
Global Const $srcinvert = 6684742
Global Const $srcpaint = 15597702
Global Const $whiteness = 16711778
Global Const $dt_bottom = 8
Global Const $dt_calcrect = 1024
Global Const $dt_center = 1
Global Const $dt_editcontrol = 8192
Global Const $dt_end_ellipsis = 32768
Global Const $dt_expandtabs = 64
Global Const $dt_externalleading = 512
Global Const $dt_hideprefix = 1048576
Global Const $dt_internal = 4096
Global Const $dt_left = 0
Global Const $dt_modifystring = 65536
Global Const $dt_noclip = 256
Global Const $dt_nofullwidthcharbreak = 524288
Global Const $dt_noprefix = 2048
Global Const $dt_path_ellipsis = 16384
Global Const $dt_prefixonly = 2097152
Global Const $dt_right = 2
Global Const $dt_rtlreading = 131072
Global Const $dt_singleline = 32
Global Const $dt_tabstop = 128
Global Const $dt_top = 0
Global Const $dt_vcenter = 4
Global Const $dt_wordbreak = 16
Global Const $dt_word_ellipsis = 262144
Global Const $rdw_erase = 4
Global Const $rdw_frame = 1024
Global Const $rdw_internalpaint = 2
Global Const $rdw_invalidate = 1
Global Const $rdw_noerase = 32
Global Const $rdw_noframe = 2048
Global Const $rdw_nointernalpaint = 16
Global Const $rdw_validate = 8
Global Const $rdw_erasenow = 512
Global Const $rdw_updatenow = 256
Global Const $rdw_allchildren = 128
Global Const $rdw_nochildren = 64
Global Const $wm_renderformat = 773
Global Const $wm_renderallformats = 774
Global Const $wm_destroyclipboard = 775
Global Const $wm_drawclipboard = 776
Global Const $wm_paintclipboard = 777
Global Const $wm_vscrollclipboard = 778
Global Const $wm_sizeclipboard = 779
Global Const $wm_askcbformatname = 780
Global Const $wm_changecbchain = 781
Global Const $wm_hscrollclipboard = 782
Global Const $hterror = -2
Global Const $httransparent = -1
Global Const $htnowhere = 0
Global Const $htclient = 1
Global Const $htcaption = 2
Global Const $htsysmenu = 3
Global Const $htgrowbox = 4
Global Const $htsize = $htgrowbox
Global Const $htmenu = 5
Global Const $hthscroll = 6
Global Const $htvscroll = 7
Global Const $htminbutton = 8
Global Const $htmaxbutton = 9
Global Const $htleft = 10
Global Const $htright = 11
Global Const $httop = 12
Global Const $httopleft = 13
Global Const $httopright = 14
Global Const $htbottom = 15
Global Const $htbottomleft = 16
Global Const $htbottomright = 17
Global Const $htborder = 18
Global Const $htreduce = $htminbutton
Global Const $htzoom = $htmaxbutton
Global Const $htsizefirst = $htleft
Global Const $htsizelast = $htbottomright
Global Const $htobject = 19
Global Const $htclose = 20
Global Const $hthelp = 21
Global Const $color_scrollbar = 0
Global Const $color_background = 1
Global Const $color_activecaption = 2
Global Const $color_inactivecaption = 3
Global Const $color_menu = 4
Global Const $color_window = 5
Global Const $color_windowframe = 6
Global Const $color_menutext = 7
Global Const $color_windowtext = 8
Global Const $color_captiontext = 9
Global Const $color_activeborder = 10
Global Const $color_inactiveborder = 11
Global Const $color_appworkspace = 12
Global Const $color_highlight = 13
Global Const $color_highlighttext = 14
Global Const $color_btnface = 15
Global Const $color_btnshadow = 16
Global Const $color_graytext = 17
Global Const $color_btntext = 18
Global Const $color_inactivecaptiontext = 19
Global Const $color_btnhighlight = 20
Global Const $color_3ddkshadow = 21
Global Const $color_3dlight = 22
Global Const $color_infotext = 23
Global Const $color_infobk = 24
Global Const $color_hotlight = 26
Global Const $color_gradientactivecaption = 27
Global Const $color_gradientinactivecaption = 28
Global Const $color_menuhilight = 29
Global Const $color_menubar = 30
Global Const $color_desktop = 1
Global Const $color_3dface = 15
Global Const $color_3dshadow = 16
Global Const $color_3dhighlight = 20
Global Const $color_3dhilight = 20
Global Const $color_btnhilight = 20
Global Const $hinst_commctrl = -1
Global Const $idb_std_small_color = 0
Global Const $idb_std_large_color = 1
Global Const $idb_view_small_color = 4
Global Const $idb_view_large_color = 5
Global Const $idb_hist_small_color = 8
Global Const $idb_hist_large_color = 9
Global Const $startf_forceofffeedback = 128
Global Const $startf_forceonfeedback = 64
Global Const $startf_runfullscreen = 32
Global Const $startf_usecountchars = 8
Global Const $startf_usefillattribute = 16
Global Const $startf_usehotkey = 512
Global Const $startf_useposition = 4
Global Const $startf_useshowwindow = 1
Global Const $startf_usesize = 2
Global Const $startf_usestdhandles = 256
Global Const $cdds_prepaint = 1
Global Const $cdds_postpaint = 2
Global Const $cdds_preerase = 3
Global Const $cdds_posterase = 4
Global Const $cdds_item = 65536
Global Const $cdds_itemprepaint = 65537
Global Const $cdds_itempostpaint = 65538
Global Const $cdds_itempreerase = 65539
Global Const $cdds_itemposterase = 65540
Global Const $cdds_subitem = 131072
Global Const $cdis_selected = 1
Global Const $cdis_grayed = 2
Global Const $cdis_disabled = 4
Global Const $cdis_checked = 8
Global Const $cdis_focus = 16
Global Const $cdis_default = 32
Global Const $cdis_hot = 64
Global Const $cdis_marked = 128
Global Const $cdis_indeterminate = 256
Global Const $cdis_showkeyboardcues = 512
Global Const $cdis_nearhot = 1024
Global Const $cdis_othersidehot = 2048
Global Const $cdis_drophilited = 4096
Global Const $cdrf_dodefault = 0
Global Const $cdrf_newfont = 2
Global Const $cdrf_skipdefault = 4
Global Const $cdrf_notifypostpaint = 16
Global Const $cdrf_notifyitemdraw = 32
Global Const $cdrf_notifysubitemdraw = 32
Global Const $cdrf_notifyposterase = 64
Global Const $cdrf_doerase = 8
Global Const $cdrf_skippostpaint = 256
Global Const $gui_ss_default_gui = BitOR($ws_minimizebox, $ws_caption, $ws_popup, $ws_sysmenu)
Global Const $fw_dontcare = 0
Global Const $fw_thin = 100
Global Const $fw_extralight = 200
Global Const $fw_ultralight = 200
Global Const $fw_light = 300
Global Const $fw_normal = 400
Global Const $fw_regular = 400
Global Const $fw_medium = 500
Global Const $fw_semibold = 600
Global Const $fw_demibold = 600
Global Const $fw_bold = 700
Global Const $fw_extrabold = 800
Global Const $fw_ultrabold = 800
Global Const $fw_heavy = 900
Global Const $fw_black = 900
Global Const $cf_effects = 256
Global Const $cf_printerfonts = 2
Global Const $cf_screenfonts = 1
Global Const $cf_noscriptsel = 8388608
Global Const $cf_inittologfontstruct = 64
Global Const $logpixelsx = 88
Global Const $logpixelsy = 90
Global Const $ansi_charset = 0
Global Const $baltic_charset = 186
Global Const $chinesebig5_charset = 136
Global Const $default_charset = 1
Global Const $easteurope_charset = 238
Global Const $gb2312_charset = 134
Global Const $greek_charset = 161
Global Const $hangeul_charset = 129
Global Const $mac_charset = 77
Global Const $oem_charset = 255
Global Const $russian_charset = 204
Global Const $shiftjis_charset = 128
Global Const $symbol_charset = 2
Global Const $turkish_charset = 162
Global Const $vietnamese_charset = 163
Global Const $out_character_precis = 2
Global Const $out_default_precis = 0
Global Const $out_device_precis = 5
Global Const $out_outline_precis = 8
Global Const $out_ps_only_precis = 10
Global Const $out_raster_precis = 6
Global Const $out_string_precis = 1
Global Const $out_stroke_precis = 3
Global Const $out_tt_only_precis = 7
Global Const $out_tt_precis = 4
Global Const $clip_character_precis = 1
Global Const $clip_default_precis = 0
Global Const $clip_embedded = 128
Global Const $clip_lh_angles = 16
Global Const $clip_mask = 15
Global Const $clip_stroke_precis = 2
Global Const $clip_tt_always = 32
Global Const $antialiased_quality = 4
Global Const $default_quality = 0
Global Const $draft_quality = 1
Global Const $nonantialiased_quality = 3
Global Const $proof_quality = 2
Global Const $default_pitch = 0
Global Const $fixed_pitch = 1
Global Const $variable_pitch = 2
Global Const $ff_decorative = 80
Global Const $ff_dontcare = 0
Global Const $ff_modern = 48
Global Const $ff_roman = 16
Global Const $ff_script = 64
Global Const $ff_swiss = 32
Global Const $tagpoint = "struct;long X;long Y;endstruct"
Global Const $tagrect = "struct;long Left;long Top;long Right;long Bottom;endstruct"
Global Const $tagsize = "struct;long X;long Y;endstruct"
Global Const $tagmargins = "int cxLeftWidth;int cxRightWidth;int cyTopHeight;int cyBottomHeight"
Global Const $tagfiletime = "struct;dword Lo;dword Hi;endstruct"
Global Const $ta****temtime = "struct;word Year;word Month;word Dow;word Day;word Hour;word Minute;word Second;word MSeconds;endstruct"
Global Const $tagtime_zone_information = "struct;long Bias;wchar StdName[32];word StdDate[8];long StdBias;wchar DayName[32];word DayDate[8];long DayBias;endstruct"
Global Const $tagnmhdr = "struct;hwnd hWndFrom;uint_ptr IDFrom;INT Code;endstruct"
Global Const $tagcomboboxexitem = "uint Mask;int_ptr Item;ptr Text;int TextMax;int Image;int SelectedImage;int OverlayImage;" & "int Indent;lparam Param"
Global Const $tagnmcbedragbegin = $tagnmhdr & ";int ItemID;wchar szText[260]"
Global Const $tagnmcbeendedit = $tagnmhdr & ";bool fChanged;int NewSelection;wchar szText[260];int Why"
Global Const $tagnmcomboboxex = $tagnmhdr & ";uint Mask;int_ptr Item;ptr Text;int TextMax;int Image;" & "int SelectedImage;int OverlayImage;int Indent;lparam Param"
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"
Global Const $tagnmdatetimechange = $tagnmhdr & ";dword Flag;" & $ta****temtime
Global Const $tagnmdatetimeformat = $tagnmhdr & ";ptr Format;" & $ta****temtime & ";ptr pDisplay;wchar Display[64]"
Global Const $tagnmdatetimeformatquery = $tagnmhdr & ";ptr Format;struct;long SizeX;long SizeY;endstruct"
Global Const $tagnmdatetimekeydown = $tagnmhdr & ";int VirtKey;ptr Format;" & $ta****temtime
Global Const $tagnmdatetimestring = $tagnmhdr & ";ptr UserString;" & $ta****temtime & ";dword Flags"
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"
Global Const $taggdipbitmapdata = "uint Width;uint Height;int Stride;int Format;ptr Scan0;uint_ptr Reserved"
Global Const $taggdipencoderparam = "byte GUID[16];ulong Count;ulong Type;ptr Values"
Global Const $taggdipencoderparams = "uint Count;byte Params[1]"
Global Const $taggdiprectf = "float X;float Y;float Width;float Height"
Global Const $taggdipstartupinput = "uint Version;ptr Callback;bool NoThread;bool NoCodecs"
Global Const $taggdipstartupoutput = "ptr HookProc;ptr UnhookProc"
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"
Global Const $taggdippencoderparams = "uint Count;byte Params[1]"
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"
Global Const $tagnmhddispinfo = $tagnmhdr & ";int Item;uint Mask;ptr Text;int TextMax;int Image;lparam lParam"
Global Const $tagnmhdfilterbtnclick = $tagnmhdr & ";int Item;" & $tagrect
Global Const $tagnmheader = $tagnmhdr & ";int Item;int Button;ptr pItem"
Global Const $taggetipaddress = "byte Field4;byte Field3;byte Field2;byte Field1"
Global Const $tagnmipaddress = $tagnmhdr & ";int Field;int Value"
Global Const $taglvfindinfo = "struct;uint Flags;ptr Text;lparam Param;" & $tagpoint & ";uint Direction;endstruct"
Global Const $taglvhittestinfo = $tagpoint & ";uint Flags;int Item;int SubItem;int iGroup"
Global Const $taglvitem = "struct;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;ptr piColFmt;int iGroup;endstruct"
Global Const $tagnmlistview = $tagnmhdr & ";int Item;int SubItem;uint NewState;uint OldState;uint Changed;" & "struct;long ActionX;long ActionY;endstruct;lparam Param"
Global Const $tagnmlvcustomdraw = "struct;" & $tagnmhdr & ";dword dwDrawStage;handle hdc;" & $tagrect & ";dword_ptr dwItemSpec;uint uItemState;lparam lItemlParam;endstruct" & ";dword clrText;dword clrTextBk;int iSubItem;dword dwItemType;dword clrFace;int iIconEffect;" & "int iIconPhase;int iPartId;int iStateId;struct;long TextLeft;long TextTop;long TextRight;long TextBottom;endstruct;uint uAlign"
Global Const $tagnmlvdispinfo = $tagnmhdr & ";" & $taglvitem
Global Const $tagnmlvfinditem = $tagnmhdr & ";int Start;" & $taglvfindinfo
Global Const $tagnmlvgetinfotip = $tagnmhdr & ";dword Flags;ptr Text;int TextMax;int Item;int SubItem;lparam lParam"
Global Const $tagnmitemactivate = $tagnmhdr & ";int Index;int SubItem;uint NewState;uint OldState;uint Changed;" & $tagpoint & ";lparam lParam;uint KeyFlags"
Global Const $tagnmlvkeydown = "align 1;" & $tagnmhdr & ";word VKey;uint Flags"
Global Const $tagnmlvscroll = $tagnmhdr & ";int DX;int DY"
Global Const $tagmchittestinfo = "uint Size;" & $tagpoint & ";uint Hit;" & $ta****temtime & ";" & $tagrect & ";int iOffset;int iRow;int iCol"
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"
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"
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"
Global Const $tagnmdaystate = $tagnmhdr & ";" & $ta****temtime & ";int DayState;ptr pDayState"
Global Const $tagnmselchange = $tagnmhdr & ";struct;word BegYear;word BegMonth;word BegDOW;word BegDay;word BegHour;word BegMinute;word BegSecond;word BegMSeconds;endstruct;" & "struct;word EndYear;word EndMonth;word EndDOW;word EndDay;word EndHour;word EndMinute;word EndSecond;word EndMSeconds;endstruct"
Global Const $tagnmobjectnotify = $tagnmhdr & ";int Item;ptr piid;ptr pObject;long Result;dword dwFlags"
Global Const $tagnmtckeydown = "align 1;" & $tagnmhdr & ";word VKey;uint Flags"
Global Const $tagtvitem = "struct;uint Mask;handle hItem;uint State;uint StateMask;ptr Text;int TextMax;int Image;int SelectedImage;" & "int Children;lparam Param;endstruct"
Global Const $tagtvitemex = "struct;" & $tagtvitem & ";int Integral;uint uStateEx;hwnd hwnd;int iExpandedImage;int iReserved;endstruct"
Global Const $tagnmtreeview = $tagnmhdr & ";uint Action;" & "struct;uint OldMask;handle OldhItem;uint OldState;uint OldStateMask;" & "ptr OldText;int OldTextMax;int OldImage;int OldSelectedImage;int OldChildren;lparam OldParam;endstruct;" & "struct;uint NewMask;handle NewhItem;uint NewState;uint NewStateMask;" & "ptr NewText;int NewTextMax;int NewImage;int NewSelectedImage;int NewChildren;lparam NewParam;endstruct;" & "struct;long PointX;long PointY;endstruct"
Global Const $tagnmtvcustomdraw = "struct;" & $tagnmhdr & ";dword DrawStage;handle HDC;" & $tagrect & ";dword_ptr ItemSpec;uint ItemState;lparam ItemParam;endstruct" & ";dword ClrText;dword ClrTextBk;int Level"
Global Const $tagnmtvdispinfo = $tagnmhdr & ";" & $tagtvitem
Global Const $tagnmtvgetinfotip = $tagnmhdr & ";ptr Text;int TextMax;handle hItem;lparam lParam"
Global Const $tagtvhittestinfo = $tagpoint & ";uint Flags;handle Item"
Global Const $tagnmtvkeydown = "align 1;" & $tagnmhdr & ";word VKey;uint Flags"
Global Const $tagnmmouse = $tagnmhdr & ";dword_ptr ItemSpec;dword_ptr ItemData;" & $tagpoint & ";lparam HitInfo"
Global Const $tagtoken_privileges = "dword Count;align 4;int64 LUID;dword Attributes"
Global Const $tagimageinfo = "handle hBitmap;handle hMask;int Unused1;int Unused2;" & $tagrect
Global Const $tagmenuinfo = "dword Size;INT Mask;dword Style;uint YMax;handle hBack;dword ContextHelpID;ulong_ptr MenuData"
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"
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;" & $tagrect & ";uint uChevronState"
Global Const $tagnmrebarautobreak = $tagnmhdr & ";uint uBand;uint wID;lparam lParam;uint uMsg;uint fStyleCurrent;bool fAutoBreak"
Global Const $tagnmrbautosize = $tagnmhdr & ";bool fChanged;" & "struct;long TargetLeft;long TargetTop;long TargetRight;long TargetBottom;endstruct;" & "struct;long ActualLeft;long ActualTop;long ActualRight;long ActualBottom;endstruct"
Global Const $tagnmrebar = $tagnmhdr & ";dword dwMask;uint uBand;uint fStyle;uint wID;lparam lParam"
Global Const $tagnmrebarchevron = $tagnmhdr & ";uint uBand;uint wID;lparam lParam;" & $tagrect & ";lparam lParamNM"
Global Const $tagnmrebarchildsize = $tagnmhdr & ";uint uBand;uint wID;" & "struct;long CLeft;long CTop;long CRight;long CBottom;endstruct;" & "struct;long BLeft;long BTop;long BRight;long BBottom;endstruct"
Global Const $tagcolorscheme = "dword Size;dword BtnHighlight;dword BtnShadow"
Global Const $tagnmtoolbar = $tagnmhdr & ";int iItem;" & "struct;int iBitmap;int idCommand;byte fsState;byte fsStyle;dword_ptr dwData;int_ptr iString;endstruct" & ";int cchText;ptr pszText;" & $tagrect
Global Const $tagnmtbhotitem = $tagnmhdr & ";int idOld;int idNew;dword dwFlags"
Global Const $tagtbbutton = "int Bitmap;int Command;byte State;byte Style;align;dword_ptr Param;int_ptr String"
Global Const $tagtbbuttoninfo = "uint Size;dword Mask;int Command;int Image;byte State;byte Style;word CX;dword_ptr Param;ptr Text;int TextMax"
Global Const $tagnetresource = "dword Scope;dword Type;dword DisplayType;dword Usage;ptr LocalName;ptr RemoteName;ptr Comment;ptr Provider"
Global Const $tagoverlapped = "ulong_ptr Internal;ulong_ptr InternalHigh;struct;dword Offset;dword OffsetHigh;endstruct;handle hEvent"
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"
Global Const $tagbitmapinfo = "struct;dword Size;long Width;long Height;word Planes;word BitCount;dword Compression;dword SizeImage;" & "long XPelsPerMeter;long YPelsPerMeter;dword ClrUsed;dword ClrImportant;endstruct;dword RGBQuad"
Global Const $tagblendfunction = "byte Op;byte Flags;byte Alpha;byte Format"
Global Const $tagguid = "ulong Data1;ushort Data2;ushort Data3;byte Data4[8]"
Global Const $tagwindowplacement = "uint length;uint flags;uint showCmd;long ptMinPosition[2];long ptMaxPosition[2];long rcNormalPosition[4]"
Global Const $tagwindowpos = "hwnd hWnd;hwnd InsertAfter;int X;int Y;int CX;int CY;uint Flags"
Global Const $tagscrollinfo = "uint cbSize;uint fMask;int nMin;int nMax;uint nPage;int nPos;int nTrackPos"
Global Const $tagscrollbarinfo = "dword cbSize;" & $tagrect & ";int dxyLineButton;int xyThumbTop;" & "int xyThumbBottom;int reserved;dword rgstate[6]"
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]"
Global Const $tagkbdllhookstruct = "dword vkCode;dword scanCode;dword flags;dword time;ulong_ptr dwExtraInfo"
Global Const $tagprocess_information = "handle hProcess;handle hThread;dword ProcessID;dword ThreadID"
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"
Global Const $tagsecurity_attributes = "dword Length;ptr Descriptor;bool InheritHandle"
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]"
Global Const $tagtextmetric = "long tmHeight;long tmAscent;long tmDescent;long tmInternalLeading;long tmExternalLeading;" & "long tmAveCharWidth;long tmMaxCharWidth;long tmWeight;long tmOverhang;long tmDigitizedAspectX;long tmDigitizedAspectY;" & "wchar tmFirstChar;wchar tmLastChar;wchar tmDefaultChar;wchar tmBreakChar;byte tmItalic;byte tmUnderlined;byte tmStruckOut;" & "byte tmPitchAndFamily;byte tmCharSet"
Func _winapi_getlasterror($curerr = @error, $curext = @extended)
Local $aresult = DllCall("kernel32.dll", "dword", "GetLastError")
Return SetError($curerr, $curext, $aresult[0])
EndFunc
Func _winapi_setlasterror($ierrcode, $curerr = @error, $curext = @extended)
DllCall("kernel32.dll", "none", "SetLastError", "dword", $ierrcode)
Return SetError($curerr, $curext)
EndFunc
Global Const $__miscconstant_cc_anycolor = 256
Global Const $__miscconstant_cc_fullopen = 2
Global Const $__miscconstant_cc_rgbinit = 1
Global Const $tagchoosecolor = "dword Size;hwnd hWndOwnder;handle hInstance;dword rgbResult;ptr CustColors;dword Flags;lparam lCustData;" & "ptr lpfnHook;ptr lpTemplateName"
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"
Func _choosecolor($ireturntype = 0, $icolorref = 0, $ireftype = 0, $hwndownder = 0)
Local $custcolors = "dword[16]"
Local $tchoose = DllStructCreate($tagchoosecolor)
Local $tcc = DllStructCreate($custcolors)
If $ireftype = 1 Then
$icolorref = Int($icolorref)
ElseIf $ireftype = 2 Then
$icolorref = Hex(String($icolorref), 6)
$icolorref = "0x" & StringMid($icolorref, 5, 2) & StringMid($icolorref, 3, 2) & StringMid($icolorref, 1, 2)
EndIf
DllStructSetData($tchoose, "Size", DllStructGetSize($tchoose))
DllStructSetData($tchoose, "hWndOwnder", $hwndownder)
DllStructSetData($tchoose, "rgbResult", $icolorref)
DllStructSetData($tchoose, "CustColors", DllStructGetPtr($tcc))
DllStructSetData($tchoose, "Flags", BitOR($__miscconstant_cc_anycolor, $__miscconstant_cc_fullopen, $__miscconstant_cc_rgbinit))
Local $aresult = DllCall("comdlg32.dll", "bool", "ChooseColor", "struct*", $tchoose)
If @error Then Return SetError @error, @extended, -1)
If $aresult[0] = 0 Then Return SetError(-3, -3, -1)
Local $color_picked = DllStructGetData($tchoose, "rgbResult")
If $ireturntype = 1 Then
Return "0x" & Hex(String($color_picked), 6)
ElseIf $ireturntype = 2 Then
$color_picked = Hex(String($color_picked), 6)
Return "0x" & StringMid($color_picked, 5, 2) & StringMid($color_picked, 3, 2) & StringMid($color_picked, 1, 2)
ElseIf $ireturntype = 0 Then
Return $color_picked
Else
Return SetError(-4, -4, -1)
EndIf
EndFunc
Func _choosefont($sfontname = "Courier New", $ipointsize = 10, $icolorref = 0, $ifontweight = 0, $iitalic = False, $iunderline = False, $istrikethru = False, $hwndowner = 0)
Local $italic = 0, $underline = 0, $strikeout = 0
Local $lngdc = __misc_getdc(0)
Local $lfheight = Round(($ipointsize * __misc_getdevicecaps($lngdc, $logpixelsx)) / 72, 0)
__misc_releasedc(0, $lngdc)
Local $tchoosefont = DllStructCreate($tagchoosefont)
Local $tlogfont = DllStructCreate($taglogfont)
DllStructSetData($tchoosefont, "Size", DllStructGetSize($tchoosefont))
DllStructSetData($tchoosefont, "hWndOwner", $hwndowner)
DllStructSetData($tchoosefont, "LogFont", DllStructGetPtr($tlogfont))
DllStructSetData($tchoosefont, "PointSize", $ipointsize)
DllStructSetData($tchoosefont, "Flags", BitOR($cf_screenfonts, $cf_printerfonts, $cf_effects, $cf_inittologfontstruct, $cf_noscriptsel))
DllStructSetData($tchoosefont, "rgbColors", $icolorref)
DllStructSetData($tchoosefont, "FontType", 0)
DllStructSetData($tlogfont, "Height", $lfheight)
DllStructSetData($tlogfont, "Weight", $ifontweight)
DllStructSetData($tlogfont, "Italic", $iitalic)
DllStructSetData($tlogfont, "Underline", $iunderline)
DllStructSetData($tlogfont, "Strikeout", $istrikethru)
DllStructSetData($tlogfont, "FaceName", $sfontname)
Local $aresult = DllCall("comdlg32.dll", "bool", "ChooseFontW", "struct*", $tchoosefont)
If @error Then Return SetError @error, @extended, -1)
If $aresult[0] = 0 Then Return SetError(-3, -3, -1)
Local $fontname = DllStructGetData($tlogfont, "FaceName")
If StringLen($fontname) = 0 AND StringLen($sfontname) > 0 Then $fontname = $sfontname
If DllStructGetData($tlogfont, "Italic") Then $italic = 2
If DllStructGetData($tlogfont, "Underline") Then $underline = 4
If DllStructGetData($tlogfont, "Strikeout") Then $strikeout = 8
Local $attributes = BitOR($italic, $underline, $strikeout)
Local $size = DllStructGetData($tchoosefont, "PointSize") / 10
Local $colorref = DllStructGetData($tchoosefont, "rgbColors")
Local $weight = DllStructGetData($tlogfont, "Weight")
Local $color_picked = Hex(String($colorref), 6)
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), ",")
EndFunc
Func _clipputfile($sfile, $sseparator = "|")
Local Const $gmem_moveable = 2, $cf_hdrop = 15
$sfile &= $sseparator & $sseparator
Local $nglobmemsize = 2 * (StringLen($sfile) + 20)
Local $aresult = DllCall("user32.dll", "bool", "OpenClipboard", "hwnd", 0)
If @error OR $aresult[0] = 0 Then Return SetError(1, _winapi_getlasterror(), False)
Local $ierror = 0, $ilasterror = 0
$aresult = DllCall("user32.dll", "bool", "EmptyClipboard")
If @error OR NOT $aresult[0] Then
$ierror = 2
$ilasterror = _winapi_getlasterror()
Else
$aresult = DllCall("kernel32.dll", "handle", "GlobalAlloc", "uint", $gmem_moveable, "ulong_ptr", $nglobmemsize)
If @error OR NOT $aresult[0] Then
$ierror = 3
$ilasterror = _winapi_getlasterror()
Else
Local $hglobal = $aresult[0]
$aresult = DllCall("kernel32.dll", "ptr", "GlobalLock", "handle", $hglobal)
If @error OR NOT $aresult[0] Then
$ierror = 4
$ilasterror = _winapi_getlasterror()
Else
Local $hlock = $aresult[0]
Local $dropfiles = DllStructCreate("dword pFiles;" & $tagpoint & ";bool fNC;bool fWide;wchar[" & StringLen($sfile) + 1 & "]", $hlock)
If @error Then Return SetError(5, 6, False)
Local $tempstruct = DllStructCreate("dword;long;long;bool;bool")
DllStructSetData($dropfiles, "pFiles", DllStructGetSize($tempstruct))
DllStructSetData($dropfiles, "X", 0)
DllStructSetData($dropfiles, "Y", 0)
DllStructSetData($dropfiles, "fNC", 0)
DllStructSetData($dropfiles, "fWide", 1)
DllStructSetData($dropfiles, 6, $sfile)
For $i = 1 To StringLen($sfile)
If DllStructGetData($dropfiles, 6, $i) = $sseparator Then DllStructSetData($dropfiles, 6, Chr(0), $i)
Next
$aresult = DllCall("user32.dll", "handle", "SetClipboardData", "uint", $cf_hdrop, "handle", $hglobal)
If @error OR NOT $aresult[0] Then
$ierror = 6
$ilasterror = _winapi_getlasterror()
EndIf
$aresult = DllCall("kernel32.dll", "bool", "GlobalUnlock", "handle", $hglobal)
If @error OR NOT $aresult[0]) AND NOT $ierror AND _winapi_getlasterror() Then
$ierror = 8
$ilasterror = _winapi_getlasterror()
EndIf
EndIf
$aresult = DllCall("kernel32.dll", "ptr", "GlobalFree", "handle", $hglobal)
If @error OR $aresult[0]) AND NOT $ierror Then
$ierror = 9
$ilasterror = _winapi_getlasterror()
EndIf
EndIf
EndIf
$aresult = DllCall("user32.dll", "bool", "CloseClipboard")
If @error OR NOT $aresult[0]) AND NOT $ierror Then Return SetError(7, _winapi_getlasterror(), False)
If $ierror Then Return SetError($ierror, $ilasterror, False)
Return True
EndFunc
Func _iif($ftest, $vtrueval, $vfalseval)
If $ftest Then
Return $vtrueval
Else
Return $vfalseval
EndIf
EndFunc
Func _mousetrap($ileft = 0, $itop = 0, $iright = 0, $ibottom = 0)
Local $aresult
If @numparams == 0 Then
$aresult = DllCall("user32.dll", "bool", "ClipCursor", "ptr", 0)
If @error OR NOT $aresult[0] Then Return SetError(1, _winapi_getlasterror(), False)
Else
If @numparams == 2 Then
$iright = $ileft + 1
$ibottom = $itop + 1
EndIf
Local $trect = DllStructCreate($tagrect)
DllStructSetData($trect, "Left", $ileft)
DllStructSetData($trect, "Top", $itop)
DllStructSetData($trect, "Right", $iright)
DllStructSetData($trect, "Bottom", $ibottom)
$aresult = DllCall("user32.dll", "bool", "ClipCursor", "struct*", $trect)
If @error OR NOT $aresult[0] Then Return SetError(2, _winapi_getlasterror(), False)
EndIf
Return True
EndFunc
Func _singleton($soccurencename, $iflag = 0)
Local Const $error_already_exists = 183
Local Const $security_descriptor_revision = 1
Local $tsecurityattributes = 0
If BitAND($iflag, 2) Then
Local $tsecuritydescriptor = DllStructCreate("byte;byte;word;ptr[4]")
Local $aret = DllCall("advapi32.dll", "bool", "InitializeSecurityDescriptor", "struct*", $tsecuritydescriptor, "dword", $security_descriptor_revision)
If @error Then Return SetError @error, @extended, 0)
If $aret[0] Then
$aret = DllCall("advapi32.dll", "bool", "SetSecurityDescriptorDacl", "struct*", $tsecuritydescriptor, "bool", 1, "ptr", 0, "bool", 0)
If @error Then Return SetError @error, @extended, 0)
If $aret[0] Then
$tsecurityattributes = DllStructCreate($tagsecurity_attributes)
DllStructSetData($tsecurityattributes, 1, DllStructGetSize($tsecurityattributes))
DllStructSetData($tsecurityattributes, 2, DllStructGetPtr($tsecuritydescriptor))
DllStructSetData($tsecurityattributes, 3, 0)
EndIf
EndIf
EndIf
Local $handle = DllCall("kernel32.dll", "handle", "CreateMutexW", "struct*", $tsecurityattributes, "bool", 1, "wstr", $soccurencename)
If @error Then Return SetError @error, @extended, 0)
Local $lasterror = DllCall("kernel32.dll", "dword", "GetLastError")
If @error Then Return SetError @error, @extended, 0)
If $lasterror[0] = $error_already_exists Then
If BitAND($iflag, 1) Then
Return SetError($lasterror[0], $lasterror[0], 0)
Else
Exit - 1
EndIf
EndIf
Return $handle[0]
EndFunc
Func _ispressed($shexkey, $vdll = "user32.dll")
Local $a_r = DllCall($vdll, "short", "GetAsyncKeyState", "int", "0x" & $shexkey)
If @error Then Return SetError @error, @extended, False)
Return BitAND($a_r[0], 32768) <> 0
EndFunc
Func _versioncompare($sversion1, $sversion2)
If $sversion1 = $sversion2 Then Return 0
Local $sep = "."
If StringInStr($sversion1, $sep) = 0 Then $sep = ","
Local $aversion1 = StringSplit($sversion1, $sep)
Local $aversion2 = StringSplit($sversion2, $sep)
If UBound($aversion1) <> UBound($aversion2) OR UBound($aversion1) = 0 Then
SetExtended(1)
If $sversion1 > $sversion2 Then
Return 1
ElseIf $sversion1 < $sversion2 Then
Return - 1
EndIf
Else
For $i = 1 To UBound($aversion1) - 1
If StringIsDigit($aversion1[$i]) AND StringIsDigit($aversion2[$i]) Then
If Number($aversion1[$i]) > Number($aversion2[$i]) Then
Return 1
ElseIf Number($aversion1[$i]) < Number($aversion2[$i]) Then
Return - 1
EndIf
Else
SetExtended(1)
If $aversion1[$i] > $aversion2[$i] Then
Return 1
ElseIf $aversion1[$i] < $aversion2[$i] Then
Return - 1
EndIf
EndIf
Next
EndIf
Return SetError(2, 0, 0)
EndFunc
Func __misc_getdc($hwnd)
Local $aresult = DllCall("User32.dll", "handle", "GetDC", "hwnd", $hwnd)
If @error OR NOT $aresult[0] Then Return SetError(1, _winapi_getlasterror(), 0)
Return $aresult[0]
EndFunc
Func __misc_getdevicecaps($hdc, $iindex)
Local $aresult = DllCall("GDI32.dll", "int", "GetDeviceCaps", "handle", $hdc, "int", $iindex)
If @error Then Return SetError @error, @extended, 0)
Return $aresult[0]
EndFunc
Func __misc_releasedc($hwnd, $hdc)
Local $aresult = DllCall("User32.dll", "int", "ReleaseDC", "hwnd", $hwnd, "handle", $hdc)
If @error Then Return SetError @error, @extended, False)
Return $aresult[0] <> 0
EndFunc
Func _ispressedex($nhexstrkey, $vdll = -1, $iwait = 0, $itformat = -1)
If $vdll = -1 OR (IsKeyword($vdll) AND $vdll = Default) Then $vdll = "User32.dll"
Local $ikeyspressed, $iret = -1
Local $asplit_keys = StringSplit($nhexstrkey, "|")
For $i = 1 To $asplit_keys[0]
If $asplit_keys[$i] = "" Then ContinueLoop
If StringInStr($asplit_keys[$i], "+") Then
$iret = -1
Local $asplit_and_keys = StringSplit($asplit_keys[$i], "+")
For $j = 1 To $asplit_and_keys[0]
If NOT _ispressedex($asplit_and_keys[$j], $vdll) Then
$iret = 0
ExitLoop
EndIf
Next
If $iret = -1 Then $iret = 1
If $iret = 1 OR $asplit_keys[0] = 1 Then Return SetExtended(BitNOT($i - 1), $iret)
ContinueLoop
EndIf
Select
Case $asplit_keys[$i] = "[:ALLKEYS:]"
$ikeyspressed = __keyspressedcheck_proc(1, 221, -1, $iwait, $itformat, $vdll)
If $ikeyspressed <> -1 Then Return SetExtended(1, $ikeyspressed)
Case $asplit_keys[$i] = "[:ALPHA:]"
$ikeyspressed = __keyspressedcheck_proc(58, 90, -1, $iwait, $itformat, $vdll)
If $ikeyspressed <> -1 Then Return SetExtended(2, $ikeyspressed)
Case $asplit_keys[$i] = "[:ALLNUM:]"
$ikeyspressed = __keyspressedcheck_proc(48, 57, -1, $iwait, $itformat, $vdll)
If $ikeyspressed <> -1 Then Return SetExtended(3, $ikeyspressed)
$ikeyspressed = __keyspressedcheck_proc(96, 105, -1, $iwait, $itformat, $vdll)
If $ikeyspressed <> -1 Then Return SetExtended(4, $ikeyspressed)
Case $asplit_keys[$i] = "[:NUMPAD:]"
$ikeyspressed = __keyspressedcheck_proc(96, 105, -1, $iwait, $itformat, $vdll)
If $ikeyspressed <> -1 Then Return SetExtended(5, $ikeyspressed)
Case $asplit_keys[$i] = "[:NUMERIC:]"
$ikeyspressed = __keyspressedcheck_proc(48, 57, -1, $iwait, $itformat, $vdll)
If $ikeyspressed <> -1 Then Return SetExtended(6, $ikeyspressed)
Case $asplit_keys[$i] = "[:ALLFUNC:]"
$ikeyspressed = __keyspressedcheck_proc(112, 135, -1, $iwait, $itformat, $vdll)
If $ikeyspressed <> -1 Then Return SetExtended(7, $ikeyspressed)
Case $asplit_keys[$i] = "[:FUNC:]"
$ikeyspressed = __keyspressedcheck_proc(112, 123, -1, $iwait, $itformat, $vdll)
If $ikeyspressed <> -1 Then Return SetExtended(8, $ikeyspressed)
Case $asplit_keys[$i] = "[:FUNCSPEC:]"
$ikeyspressed = __keyspressedcheck_proc(124, 135, -1, $iwait, $itformat, $vdll)
If $ikeyspressed <> -1 Then Return SetExtended(9, $ikeyspressed)
Case $asplit_keys[$i] = "[:ARROW:]"
$ikeyspressed = __keyspressedcheck_proc(37, 40, -1, $iwait, $itformat, $vdll)
If $ikeyspressed <> -1 Then Return SetExtended(10, $ikeyspressed)
Case $asplit_keys[$i] = "[:ALLMOUSE:]"
$ikeyspressed = __keyspressedcheck_proc(1, 6, -1, $iwait, $itformat, $vdll)
If $ikeyspressed <> -1 Then Return SetExtended(11, $ikeyspressed)
If __ismouseevent(1) Then Return SetExtended(12, 1)
If __ismouseevent(2) Then Return SetExtended(13, 1)
If __ismouseevent(3) Then Return SetExtended(14, 1)
Case $asplit_keys[$i] = "[:MOUSEMOVE:]"
If __ismouseevent(1) Then Return SetExtended(15, 1)
Case $asplit_keys[$i] = "[:WHEELDOWN:]"
If __ismouseevent(2) Then Return SetExtended(16, 1)
Case $asplit_keys[$i] = "[:WHEELSCROLL:]"
If __ismouseevent(3) Then Return SetExtended(17, 1)
Case $asplit_keys[$i] = "[:SPECIAL:]"
$ikeyspressed = __keyspressedcheck_proc(8, 36, -1, $iwait, $itformat, $vdll)
If $ikeyspressed <> -1 Then Return SetExtended(18, $ikeyspressed)
$ikeyspressed = __keyspressedcheck_proc(41, 46, -1, $iwait, $itformat, $vdll)
If $ikeyspressed <> -1 Then Return SetExtended(19, $ikeyspressed)
$ikeyspressed = __keyspressedcheck_proc(91, 92, -1, $iwait, $itformat, $vdll)
If $ikeyspressed <> -1 Then Return SetExtended(20, $ikeyspressed)
$ikeyspressed = __keyspressedcheck_proc(106, 111, -1, $iwait, $itformat, $vdll)
If $ikeyspressed <> -1 Then Return SetExtended(21, $ikeyspressed)
$ikeyspressed = __keyspressedcheck_proc(136, 221, -1, $iwait, $itformat, $vdll)
If $ikeyspressed <> -1 Then Return SetExtended(22, $ikeyspressed)
Case $iret <> 1
$ikeyspressed = __keyspressedcheck_proc(1, 1, $asplit_keys[$i], $iwait, $itformat, $vdll)
If $ikeyspressed <> -1 Then Return SetExtended(30, $ikeyspressed)
EndSelect
Next
If $iret = -1 Then $iret = 0
Return $iret
EndFunc
#Region helper functions
Func __ispressed_gettime($shexkey, $iformat = -1, $vdll = "User32.dll")
If _ispressed($shexkey, $vdll) Then
Local $itimerinit = TimerInit()
While _ispressed($shexkey, $vdll)
Sleep(10)
WEnd
Local $idiffkey = TimerDiff($itimerinit)
If $iformat <= 0 OR (IsKeyword($iformat) AND $iformat = Default) Then Return $idiffkey
If $iformat >= 1 Then Return __secondstotime(Round($idiffkey / 1000))
EndIf
Return 0
EndFunc
Func __ismouseevent($ievent)
Local Const $wh_mouse_ll = 14
Local Const $mouse_move_event = 512
Local Const $mouse_primarydown_event = 513
Local Const $mouse_primaryup_event = 514
Local Const $mouse_secondarydown_event = 516
Local Const $mouse_secondaryup_event = 517
Local Const $mouse_wheeldown_event = 519
Local Const $mouse_wheelup_event = 520
Local Const $mouse_wheelscroll_event = 522
Local Const $mouse_extrabuttondown_event = 523
Local Const $mouse_extrabuttonup_event = 524
Local $hcallback_keyhook = DllCallbackRegister("__MouseEvent_Callback", "int", "int;ptr;ptr")
Local $hm_module = DllCall("Kernel32.dll", "hwnd", "GetModuleHandle", "ptr", 0)
Local $hm_hook = DllCall("User32.dll", "hwnd", "SetWindowsHookEx", "int", $wh_mouse_ll, "ptr", DllCallbackGetPtr($hcallback_keyhook), "hwnd", $hm_module[0], "dword", 0)
Sleep(10)
If IsPtr($hcallback_keyhook) Then
DllCallbackFree($hcallback_keyhook)
$hcallback_keyhook = 0
EndIf
If IsArray($hm_hook) AND $hm_hook[0] > 0 Then
DllCall("user32.dll", "int", "UnhookWindowsHookEx", "hwnd", $hm_hook[0])
$hm_hook[0] = 0
EndIf
If NOT IsDeclared("iIs__Mouse__Event") Then Return 0
Local $ireturn = Eval("iIs__Mouse__Event")
Assign("iIs__Mouse__Event", 0)
Switch $ievent
Case 1
Return ($ireturn = $mouse_move_event)
Case 2
Return ($ireturn = $mouse_wheeldown_event)
Case 3
Return ($ireturn = $mouse_wheelscroll_event)
EndSwitch
Return SetError(1, 0, 0)
EndFunc
Func __mouseevent_callback($ncode, $wparam, $lparam)
Local $ievent = BitAND($wparam, 65535)
If NOT Eval("iIs__Mouse__Event") Then Assign("iIs__Mouse__Event", $ievent, 2)
Return 0
EndFunc
Func __keyspressedcheck_proc($istart, $ifinish, $ihexkey = -1, $iwait = 0, $itformat = -1, $vdll = "User32.dll")
Local $ikey, $ia_r, $nhex_key, $adelim_keys
If $ihexkey <> -1 Then
$ihexkey = __keystr_to_vkcode($ihexkey)
If @error Then $ihexkey = __keygettype($ihexkey, 1)
EndIf
For $ikey = $istart To $ifinish
If $ihexkey <> -1 Then
$nhex_key = $ihexkey
Else
$nhex_key = Hex($ikey, 2)
If $ikey > 127 AND $ikey < 136 Then $nhex_key &= "H"
EndIf
If StringInStr($nhex_key, "|") Then
$adelim_keys = StringSplit($nhex_key, "|")
For $jkey = 1 To $adelim_keys[0]
$ia_r = DllCall($vdll, "int", "GetAsyncKeyState", "int", "0x" & $adelim_keys[$jkey])
If NOT @error AND BitAND($ia_r[0], 32768) = 32768 Then
If $iwait Then Return __ispressed_gettime($adelim_keys[$jkey], $itformat, $vdll)
Return 1
EndIf
Next
Else
$ia_r = DllCall($vdll, "int", "GetAsyncKeyState", "int", "0x" & $nhex_key)
If NOT @error AND BitAND($ia_r[0], 32768) = 32768 Then
If $iwait Then Return __ispressed_gettime($nhex_key, $itformat, $vdll)
Return 1
EndIf
EndIf
Next
Return - 1
EndFunc
Func __keygettype($ikeyin, $irettype = 0)
If $ikeyin = "" Then Return - 1
Local $s_string = "|01{LMouse}|02{RMouse}|04{MMouse}|05{X1Mouse}|06{X2Mouse}|08{BACKSPACE}|09{TAB}|0C{CLEAR}|" & "0D{ENTER}|10{SHIFT}|11{CTRL}|12{ALT}|13{PAUSE}|14{CAPSLOCK}|1B{ESC}|20{SPACE}|21{PGUP}|22{PGDN}|" & "23{END}|24{HOME}|25{LEFT}|26{UP}|27{RIGHT}|28{DOWN}|29{SELECT}|2A{PRINT}|2B{EXECUTE}|2C{PRINTSCREEN}|2D{INS}|" & "2E{DEL}|30{0}|31{1}|32{2}|33{3}|34{4}|35{5}|36{6}|37{7}|38{8}|39{9}|41{A}|42{B}|43{C}|44{D}|45{E}|46{F}|47{G}|" & "48{H}|49{I}|4A{J}|4B{K}|4C{L}|4D{M}|4E{N}|4F{O}|50{P}|51{Q}|52{R}|53{S}|54{T}|55{U}|56{V}|57{W}|58{X}|59{Y}|5A{Z}|" & "5B{LWindows}|5C{RWindows}|60{Numpad0}|61{Numpad1}|62{Numpad2}|63{Numpad3}|64{Numpad4}|65{Numpad5}|" & "66{Numpad6}|67{Numpad7}|68{Numpad8}|69{Numpad9}|" & "6A{Multiply}|6B{Add}|6C{Separator}|6D{Subtract}|6E{Decimal}|6F{Divide}|" & "70{F1}|71{F2}|72{F3}|73{F4}|74{F5}|75{F6}|76{F7}|77{F8}|78{F9}|" & "79{F10}|7A{F11}|7B{F12}|7C{F13}|7D{F14}|7E{F15}|7F{F16}|80H{F17}|81H{F18}|82H{F19}|83H{F20}|84H{F21}|85H{F22}|" & "86H{F23}|87H{F24}|90{NUMLOCK}|91{SCROLLLOCK}|A0{LSHIFT}|A1{RSHIFT}|A2{LCTRL}|A3{RCTRL}|" & "A4{LMENU}|A5{RMENU}|BA{;}|BB{=}|BC{,}|BD{-}|BE{.}|BF{/}|C0{`}|DB{[}|DC{\}|DD{]}|"
If $irettype = 1 Then
$s_string = StringRegExpReplace($s_string, "(?i).*\|(.*?)\{" & $ikeyin & "\}\|.*", "\1")
Else
$s_string = StringRegExpReplace($s_string, "(?i).*\|" & $ikeyin & "\{(.*?)\}\|.*", "\1")
EndIf
If @extended > 0 Then Return $s_string
Return $ikeyin
EndFunc
Func __keystr_to_vkcode($skeystr)
Local $sret_keys = "", $adelim_keys[1]
Local $akeys = StringSplit("{LMouse}|{RMouse}|{}|(MMouse}|{}|{}|{}|{BACKSPACE}|{TAB}|{}|{}|{}|{ENTER}|{}|{}|{SHIFT}|{CTRL}|{ALT}|{PAUSE}|{CAPSLOCK}|{}|{}|{}|{}|{}|{}|{ESC}|{}|{}|{}|{]|{SPACE}|{PGUP}|{PGDN}|{END}|{HOME}|{LEFT}|{UP}|{RIGHT}|{DOWN}|{SELECT}|{PRINTSCREEN}|{}|{PRINTSCREEN}|{INSERT}|{DEL}|{}|0|1|2|3|4|5|6|7|8|9|{}|{}|{}|{}|{}|{}|{}|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|{LWIN}|{RWIN}|{APPSKEY}|{}|{SLEEP}|{Numpad0}|{Numpad1}|{Numpad2}|{Numpad3}|{Numpad4}|{Numpad5}|{Numpad6}|{Numpad7}|{Numpad8}|{Numpad9}|{NUMPADMULT}|{NUMPADADD}|{}|{NUMPADSUB}|{NUMPADDOT}|{NUMPADDIV}|{F1}|{F2}|{F3}|{F4}|{F5}|{F6}|{F7}|{F8}|{F9}|{F10}|{F11}|{F12}|{F13}|{F14}|{F15}|{F16}|{F17}|{F18}|{F19}|{F20}|{F21}|{F22}|{F23}|{F24}|{}|{}|{}|{}|{}|{}|{}|{}|{NUMLOCK}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{SHIFT}|{SHIFT}|{CTRL}|{CTRL}|{ALT}|{ALT}|{BROWSER_BACK}|{BROWSER_FORWARD}|{BROWSER_REFRESH}|{BROWSER_STOP}|{BROWSER_SEARCH}|{BROWSER_FAVORITES}|{BROWSER_HOME}|{VOLUME_MUTE}|{VOLUME_DOWN}|{VOLUME_UP}|{MEDIA_NEXT}|{MEDIA_PREV}|{MEDIA_STOP}|{MEDIA_PLAY_PAUSE}|{LAUNCH_MAIL}|{LAUNCH_MEDIA}|{LAUNCH_APP1}|{LAUNCH_APP2}|{}|{}|;|{+}|,|{-}|.|/|`|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|[|\|]|'", "|")
If StringRegExp($skeystr, "\A\[|\]\z") Then
$skeystr = StringRegExpReplace($skeystr, "\A\[|\]\z", "")
$skeystr = StringRegExpReplace($skeystr, "(.)", "\1|")
$skeystr = StringRegExpReplace($skeystr, "\|+$", "")
$adelim_keys = StringSplit($skeystr, "")
EndIf
For $i = 1 To $akeys[0]
If $adelim_keys[0] > 1 Then
For $j = 1 To $adelim_keys[0]
If $akeys[$i] = $adelim_keys[$j] Then $sret_keys &= Hex($i, 2) & "|"
Next
Else
If $akeys[$i] = $skeystr Then Return Hex($i, 2)
EndIf
Next
If $sret_keys = "" Then Return SetError(1, 0, $skeystr)
Return StringRegExpReplace($sret_keys, "\|+$", "")
EndFunc
Func __secondstotime($iticks, $sdelim = ":")
If Number($iticks) >= 0 Then
Local $ihours = Int($iticks / 3600)
$iticks = Mod($iticks, 3600)
Local $imins = Int($iticks / 60)
Local $isecs = Round(Mod($iticks, 60))
If StringLen($ihours) = 1 Then $ihours = "0" & $ihours
If StringLen($imins) = 1 Then $imins = "0" & $imins
If StringLen($isecs) = 1 Then $isecs = "0" & $isecs
Return $ihours & $sdelim & $imins & $sdelim & $isecs
EndIf
Return SetError(1, 0, 0)
EndFunc
#EndRegion helper functions
#Region ### start koda gui section ### form=
$form1 = GUICreate("NFE-R25-J | Professional Macro", 509, 381, 192, 124)
$pic1 = GUICtrlCreatePic(@ScriptDir & "\MPGH.jpg", 0, 0, 509, 150)
$exit = GUICtrlCreateButton("Exit", 400, 352, 91, 25)
$qs = GUICtrlCreateSlider(160, 344, 150, 29)
GUICtrlSetLimit(-1, 7, 1)
GUICtrlSetData(-1, 1)
$label3 = GUICtrlCreateLabel("QS Delay: (1) millisecond", 8, 344, 146, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 8388608)
$qss = GUICtrlCreateButton("Start QS", 320, 340, 57, 35)
$sas = GUICtrlCreateButton("Start Auto-Shot", 200, 249, 90, 25)
$wait = GUICtrlCreateLabel("Waiting for AVA.", 395, 330, 146, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 8388608)
$label4 = GUICtrlCreateLabel("Spam bot:", 8, 184, 61, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 8388608)
$spam = GUICtrlCreateCombo("", 72, 184, 233, 25, BitOR($cbs_dropdown, $cbs_autohscroll))
GUICtrlSetData(-1, "What daa Fuck Aeria? Fuck you Aeria.|I" & Chr(39) & "m not a fucking hacker....|I" & Chr(39) & "m spammer....|MPGH is the best hacking site....|Sorry , My friend will play with me!|Add me..|Fake GM , Fake GM , Fake GM!|Visit MPGH To Get VIP Hacks....!|Oh dear , I" & Chr(39) & "m cooking...!|I'm a hacker")
$sspam = GUICtrlCreateButton("Start-Spam", 340, 184, 79, 25)
$spress = GUICtrlCreateButton("Start", 240, 293, 79, 25)
$label5 = GUICtrlCreateLabel("Auto-Shot(50)MS :", 8, 216, 108, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 8388608)
$asd = GUICtrlCreateSlider(121, 216, 151, 25)
GUICtrlSetLimit(-1, 100, 50)
GUICtrlSetData(-1, 50)
$ammo = GUICtrlCreateInput("", 416, 224, 33, 21)
$label6 = GUICtrlCreateLabel("Ammo Bullets:", 328, 224, 83, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 128)
$reload = GUICtrlCreateCheckbox("Reload after AutoShot", 8, 252, 145, 17)
GUICtrlSetState(-1, $gui_checked)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 32768)
$label7 = GUICtrlCreateLabel("Auto-Press:", 8, 296, 69, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 8388608)
$api = GUICtrlCreateCombo("", 80, 296, 145, 25, BitOR($cbs_dropdown, $cbs_autohscroll))
GUICtrlSetData(-1, "{F1}|{F2}|{F3}|{F4}|{F5}|{F6}|{F7}|{F8}|{F9}|P|S|T|Home|Insert|Delete|End|PageUp|PageDown")
GUISetState(@SW_SHOW)
#EndRegion ### end koda gui section ###
Global $pe = ProcessExists("AVA.exe")
Global $fs = 1
Global $fsx = 1
Global $see = GUICtrlRead($qs)
While 1
$nmsg = GUIGetMsg()
Switch $nmsg
Case $gui_event_close
Exit
Case $exit
Exit
Case $spress
$apig = GUICtrlRead($api)
If $pe = 1 AND $apig = "" OR $pe = 0 AND $apig = "" Then
MsgBox(0, "Error", "Alliance of Valiant Arms was not found or you didn't input a key!")
EndIf
If $pe = 1 Then
$apig = GUICtrlRead($api)
ControlSend("Alliance of Valiant Arms", "", "", "'" & $apig & "'")
ElseIf $pe = 0 Then
MsgBox(0, "Error", "Alliance of Valiant Arms was not found!")
EndIf
Case $sspam
If $pe = 1 Then
ControlSend("Alliance of Valiant Arms", "", "", "" & $spam & "")
ElseIf $pe = 0 Then
MsgBox(0, "Error", "Alliance of Valiant Arms was not found!")
EndIf
Case $qss
_start()
Case $asd
$gets = GUICtrlRead($asd)
GUICtrlSetData($label5, "Auto-Shot(" & $gets & ")MS")
Case $qs
$gets1 = GUICtrlRead($qs)
GUICtrlSetData($label3, "QS Delay: (" & $gets1 & ") millisecond")
Case $sas
$check = GUICtrlRead($reload)
$check1 = GUICtrlRead($asd)
$check2 = GUICtrlRead($ammo)
If $pe = 1 Then
If _ispressed("01") Then
Do
MouseClick("Right")
Sleep($check1)
$de = $check1 / $check2
Until _ispressed("23")
Sleep($de)
If $check = $gui_checked Then
ControlSend("Alliance of Valiant Arms", "", "", "{R}")
EndIf
EndIf
ElseIf $pe = 0 AND $check2 = "" Then
MsgBox(0, "Error", "AVA is not found and Please Enter Ammo Bullet Number!")
ElseIf $pe = 1 AND $check2 = "" Then
MsgBox(0, "Error", "Please Enter Ammo Bullet Number!")
ElseIf $pe = 0 Then
MsgBox(0, "Error", "AVA is not found!")
EndIf
EndSwitch
If $pe = 1 Then
GUICtrlSetData($wait, "AVA was found!")
Sleep(10)
ElseIf $pe = 0 Then
Sleep(30)
GUICtrlSetData($wait, "Waiting for AVA..")
Sleep(30)
GUICtrlSetData($wait, "Waiting for AVA.")
EndIf
WEnd
Func _start()
If $fsx = 1 AND $pe = 1 Then
Do
While 1
If _ispressed("01") Then
MouseClick("middle")
Sleep($see)
ControlSend("Alliance of Valiant Arms", "", "", "{q}")
Sleep(10)
ControlSend("Alliance of Valiant Arms", "", "", "{q}")
If $fsx = 0 Then
Return
EndIf
EndIf
WEnd
Until $fsx = 0
ElseIf $pe = 0 Then
MsgBox(0, "Error", "Alliance of Valiant Arms was not found!")
Else
MsgBox(0, "Error", "Be sure that you opened the macro as administrator!")
EndIf
EndFunc