Jump to content

Printer Firmware Generator Hakkında.


justpl4y
 Share

Recommended Posts

Ücretsiz olarak dağıtılmış olan ve bazı yazıcı modelleri için hala kullanılmakta olan GenFix yazılımını unpack edip kurcalarken autoit ile yazıldığını farkettim.
Yazıcılar için firmware'ı tam olarak neye dayanarak oluşturuyor, autoit üstatları kodu kurcalayabilir mi acaba?
Güncel yazıcılar için yazılımlar ücretli, kodun oluşturulma mantığı çözülebilirse diğer firmware'ler için programa update yapılabilir diye düşünüyorum. Gerekirse elimde bir kaç farklı yazıcı için satın alınmış firmware var.


Boyutu küçültmek amacıyla 1660 dışındaki firmwareler silinmiştir, program açılışta hata veriyor ama sorunsuz olarak çalışıyor.
İndirme linki;
http://www.mediafire.com/download/4zo952otuj5obtb/Genfix.rar

Kaynak kod:
 

#AutoIt3Wrapper_Res_File_Add=resfile
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 $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 $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_quit = 18
Global Const $wm_erasebkgnd = 20
Global Const $wm_syscolorchange = 21
Global Const $wm_showwindow = 24
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_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_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_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_keydown = 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_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 $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_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_rbuttondblck = 518
Global Const $wm_mbuttondown = 519
Global Const $wm_mbuttonup = 520
Global Const $wm_mbuttondblck = 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)
#NoTrayIcon
Opt("GUICloseOnESC", 0)
Opt("GUIOnEventMode", 0)
Global $dev[26], $src[26][3], $sn[2], $fin[6]
dev_check()
$gui_main = GUICreate("GenFix v final", 220, 416, -1, -1, -1765277696)
GUISetBkColor(12632256)
GUISetState(@SW_SHOW, $gui_main)
gui_device()
Exit 

Func dev_check()
	$src[0][0] = "1660v34u"
	$src[0][1] = "1660_v34"
	$src[0][2] = "ML-1660 v34"
	$src[1][0] = "1660v34nu"
	$src[1][1] = "NU_1660_v34"
	$src[1][2] = "NU"
	$src[2][0] = "1860v18u"
	$src[2][1] = "1860_v18"
	$src[2][2] = "ML-1860 v18"
	$src[3][0] = "1860v18nu"
	$src[3][1] = "NU_1860_v18"
	$src[3][2] = "NU"
	$src[4][0] = "1860v19nu"
	$src[4][1] = "NU_1860_v19"
	$src[4][2] = "v19 NU"
	$src[5][0] = "2520v84nu"
	$src[5][1] = "NU_2520_v84"
	$src[5][2] = "ML-2520 v84"
	$src[6][0] = "2525v85u"
	$src[6][1] = "2525_v85"
	$src[6][2] = "ML-2525 v85"
	$src[7][0] = "2580v84u"
	$src[7][1] = "2580_v84"
	$src[7][2] = "ML-2580 v84"
	$src[8][0] = "1910v83nu"
	$src[8][1] = "NU_1910_v83"
	$src[8][2] = "ML-1910 v83"
	$src[9][0] = "3200v7nu"
	$src[9][1] = "3200_v07"
	$src[9][2] = "SCX-3200 v07"
	$src[10][0] = "3200v7nu"
	$src[10][1] = "NU_3200_v07"
	$src[10][2] = "NU"
	$src[11][0] = "3200v08u"
	$src[11][1] = "3200_v08"
	$src[11][2] = "v08"
	$src[12][0] = "3200v08nu"
	$src[12][1] = "NU_3200_v08"
	$src[12][2] = "NU"
	$src[13][0] = "4824v9436nu"
	$src[13][1] = "4824_v94.36"
	$src[13][2] = "SCX-4824 v94.36"
	$src[14][0] = "4824v9436nu"
	$src[14][1] = "NU_4824_v94.36"
	$src[14][2] = "NU"
	$src[15][0] = "4824v44nu"
	$src[15][1] = "NU_4824_v44"
	$src[15][2] = "44 NU"
	$src[16][0] = "4824v45nu"
	$src[16][1] = "NU_4824_v45"
	$src[16][2] = "45 NU"
	$src[17][0] = "4x28v36nu"
	$src[17][1] = "NU_4x28_v94.36"
	$src[17][2] = "SCX-4828 v94.36 NU"
	$src[18][0] = "4x28v45nu"
	$src[18][1] = "4x28_v45"
	$src[18][2] = "v45"
	$src[19][0] = "4x28v45nu"
	$src[19][1] = "NU_4x28_v45"
	$src[19][2] = "NU"
	$src[20][0] = "4600v99u"
	$src[20][1] = "4600_v99"
	$src[20][2] = "SCX-4600, 4623f v99"
	$src[21][0] = "4623fn98u"
	$src[21][1] = "4623fn_v98"
	$src[21][2] = "SCX-4623fn v98"
	$src[22][0] = "4623fn99u"
	$src[22][1] = "4623fn_v99"
	$src[22][2] = "v99"
	$src[23][0] = "4623fn99nu"
	$src[23][1] = "NU_4623fn_v99"
	$src[23][2] = "NU"
	$src[24][0] = "3140v73nu"
	$src[24][1] = "NU_3140_v73x"
	$src[24][2] = "Xerox 3140 v73"
	$src[25][0] = "3155v46nu"
	$src[25][1] = "NU_3155_v46"
	$src[25][2] = "Xerox 3155 v46"
	$j = 0
	For $i = 0 To UBound($src) - 1
		If NOT FileExists(@ScriptDir & "\1\" & $src[$i][0]) Then $j = 1
	Next
	If $j = 1 Then MsgBox(16, "Genfix v final", "The specified file was not found")
EndFunc

Func gui_device()
	$x = 4
	$y = 4
	$dev[0] = GUICtrlCreateButton($src[0][2], $x + 0, $y + 6, 172, 25)
	$dev[1] = GUICtrlCreateButton($src[1][2], $x + 178, $y + 6, 30, 25)
	$dev[2] = GUICtrlCreateButton($src[2][2], $x + 0, $y + 37, 109, 25)
	$dev[3] = GUICtrlCreateButton($src[3][2], $x + 114, $y + 37, 33, 25)
	$dev[4] = GUICtrlCreateButton($src[4][2], $x + 152, $y + 37, 56, 25)
	$dev[5] = GUICtrlCreateButton($src[5][2], $x + 0, $y + 68, 208, 25)
	$dev[6] = GUICtrlCreateButton($src[6][2], $x + 0, $y + 100, 208, 25)
	$dev[7] = GUICtrlCreateButton($src[7][2], $x + 0, $y + 131, 208, 25)
	$dev[8] = GUICtrlCreateButton($src[8][2], $x + 0, $y + 162, 208, 25)
	$dev[9] = GUICtrlCreateButton($src[9][2], $x + 0, $y + 193, 96, 25)
	$dev[10] = GUICtrlCreateButton($src[10][2], $x + 102, $y + 193, 30, 25)
	$dev[11] = GUICtrlCreateButton($src[11][2], $x + 138, $y + 193, 34, 25)
	$dev[12] = GUICtrlCreateButton($src[12][2], $x + 178, $y + 193, 30, 25)
	$dev[13] = GUICtrlCreateButton($src[13][2], $x + 0, $y + 224, 96, 25)
	$dev[15] = GUICtrlCreateButton($src[14][2], $x + 100, $y + 224, 25, 25)
	$dev[16] = GUICtrlCreateButton($src[15][2], $x + 129, $y + 224, 37, 25)
	$dev[17] = GUICtrlCreateButton($src[16][2], $x + 170, $y + 224, 38, 25)
	$dev[18] = GUICtrlCreateButton($src[17][2], $x + 0, $y + 255, 138, 25)
	$dev[14] = GUICtrlCreateButton($src[18][2], $x + 142, $y + 255, 31, 25)
	$dev[19] = GUICtrlCreateButton($src[19][2], $x + 178, $y + 255, 30, 25)
	$dev[20] = GUICtrlCreateButton($src[20][2], $x + 0, $y + 286, 208, 25)
	$dev[21] = GUICtrlCreateButton($src[21][2], $x + 0, $y + 317, 138, 25)
	$dev[22] = GUICtrlCreateButton($src[22][2], $x + 142, $y + 317, 32, 25)
	$dev[23] = GUICtrlCreateButton($src[23][2], $x + 178, $y + 317, 30, 25)
	$dev[24] = GUICtrlCreateButton($src[24][2], $x + 0, $y + 348, 208, 25)
	$dev[25] = GUICtrlCreateButton($src[25][2], $x + 0, $y + 379, 208, 25)
	GUISetState()
	ControlFocus("", "", $dev[11])
	While 1
		$msg = GUIGetMsg()
		If $msg = $gui_event_close Then Exit 
		For $i = 0 To UBound($dev) - 1
			If $msg = $dev[$i] Then
				For $j = 0 To UBound($dev) - 1
					GUICtrlDelete($dev[$j])
				Next
				gui_serial($i)
			EndIf
		Next
	WEnd
EndFunc

Func gui_serial($ver)
	GUISetState()
	While 1
		$sn[0] = GUICtrlCreateEdit("Z111111Z111111Z", 4, 10, 138, 25, 1409351872, 512)
		GUICtrlSetFont(-1, 10)
		$sn[1] = GUICtrlCreateButton("Ok", 148, 10, 64, 25)
		While 1
			$msg = GUIGetMsg()
			If $msg = $gui_event_close Then Exit 
			If $msg = $sn[1] Then
				check_sn($ver, GUICtrlRead($sn[0]))
			EndIf
		WEnd
	WEnd
EndFunc

Func check_sn($ver, $serial)
	If $ver > -1 AND $ver < 24 AND StringLen($serial) <> 15 Then
		GUICtrlSetData($sn[0], "")
		Return 
	EndIf
	If $ver > 23 AND $ver < 26 AND StringLen($serial) <> 10 Then
		GUICtrlSetData($sn[0], "")
		Return 
	EndIf
	GUICtrlDelete($sn[0])
	GUICtrlDelete($sn[1])
	make_fix($ver, $serial)
EndFunc

Func make_fix($ver, $serial)
	GUISetState()
	$file_o = $serial & "_FIX_" & $src[$ver][1] & ".hd"
	$fin[0] = GUICtrlCreateLabel("READY!!!", 12, 6, 200, 30)
	GUICtrlSetColor(-1, 32768)
	GUICtrlSetFont(-1, 21, 400, 0, "Times New Roman")
	$fin[1] = GUICtrlCreateLabel($file_o, 4, 50, 2000, 20)
	If NOT FileExists(@ScriptDir & "\1\" & $src[$ver][0]) Then
		MsgBox(16, "Genfix v final", 'Cannot open file "' & @ScriptDir & "\1\" & $src[$ver][0] & '". 5 C405BAO =09B8 C:070==K9 D09;.', 0, $gui_main)
		While 1
			If GUIGetMsg() = $gui_event_close Then Exit 
		WEnd
	EndIf
	Sleep(500)
	FileCopy(@ScriptDir & "\1\" & $src[$ver][0], @ScriptDir & "\" & $file_o, 1)
	$fin[2] = GUICtrlCreateLabel("Process complite", 6, 170, 110, 20)
	$fin[3] = GUICtrlCreateButton("Next FIX", 116, 166, 95, 24)
	$fin[4] = GUICtrlCreateButton("BGQB", 4, 197, 208, 25)
	$fin[5] = GUICtrlCreateButton("Exit program", 4, 329, 207, 25)
	GUICtrlSetFont($fin[2], 10)
	If NOT FileExists(@ScriptDir & "\a.bat") Then MsgBox(0 + 16, "Genfix v final", 'Cannot open file "' & @ScriptDir & '\a.bat". 5 C405BAO =09B8 C:070==K9 D09;.', 0, $gui_main)
	While 1
		$msg = GUIGetMsg()
		If $msg = $gui_event_close Then Exit 
		If $msg = $fin[5] Then Exit 
		If $msg = $fin[4] Then make_otchet()
		If $msg = $fin[3] Then
			GUICtrlDelete($fin[0])
			GUICtrlDelete($fin[1])
			GUICtrlDelete($fin[2])
			GUICtrlDelete($fin[3])
			GUICtrlDelete($fin[4])
			GUICtrlDelete($fin[5])
			gui_device()
			ExitLoop 2
		EndIf
	WEnd
EndFunc

Func make_otchet()
	$otchet = GUICreate("!B0B8AB8:0", 543, 544, -1, -1, -1765277696, -1, $gui_main)
	$txt = "14.09.2011 14:56:05 : 6568BAHZ100896T_FIX_NU_4x28_v94.36.hd" & @CRLF & "14.09.2011 17:15:05 : 0000000000_FIX_NU_3155_v46.hd" & @CRLF & "15.09.2011 11:16:22 : Z2LUBABB400153H_FIX_2525_v85.hd" & @CRLF & "15.09.2011 11:16:35 : Z2LUBABB400100J_FIX_2525_v85.hd" & @CRLF & "15.09.2011 11:26:19 : Z2LUBABB400153H_FIX_2525_v85.hd" & @CRLF & "15.09.2011 11:26:30 : Z2LUBABB400100J_FIX_2525_v85.hd" & @CRLF & "29.09.2011 17:18:32 : Z5MDBKEZC07517L_FIX_NU_1860_v19.hd" & @CRLF & "29.09.2011 20:10:48 : Z2U1BFFZ100449F_FIX_4600_v99.hd" & @CRLF & "29.09.2011 20:13:31 : Z2U1BFFZ100449F_FIX_NU_4623fn_v99.hd" & @CRLF & "29.09.2011 23:16:45 : Z5MDBKEB201719A_FIX_NU_1860_v19.hd" & @CRLF & "29.09.2011 23:19:28 : Z5MDBKEB201719A_FIX_NU_1860_v19.hd" & @CRLF & "04.10.2011 21:36:57 : Z5MDBKBZC02215K_FIX_NU_1860_v19.hd" & @CRLF & "06.10.2011 12:10:44 : Z501BFEB504872W_FIX_NU_3200_v08.hd" & @CRLF & "06.10.2011 17:00:00 : Z5MBBKCZC00643Y_FIX_NU_1860_v19.hd" & @CRLF & "11.10.2011 20:48:39 : Z5MDBAAB300238H_FIX_NU_1860_v19.hd" & @CRLF & "11.10.2011 20:49:42 : Z5MDBAAB300238H_FIX_NU_1860_v19.hd" & @CRLF & "12.10.2011 19:28:33 : Z5MBBAAB200921E_FIX_NU_1860_v19.hd" & @CRLF & "14.10.2011 21:54:16 : Z5MBBKCB100050F_FIX_NU_1860_v19.hd" & @CRLF & "14.10.2011 21:54:46 : Z5MBBKCB100050F_FIX_NU_1860_v19.hd" & @CRLF & "18.10.2011 20:45:42 : Z5IGBFAZ900151Y_FIX_NU_3200_v07.hd" & @CRLF & "20.10.2011 15:24:57 : Z5IGBFEB302992T_FIX_NU_3200_v08.hd" & @CRLF & "20.10.2011 18:56:59 : Z4R2BKBZ403055V_FIX_NU_1660_v34.hd" & @CRLF & "21.10.2011 18:44:58 : Z2TVBAAB100079J_FIX_NU_4623fn_v99.hd" & @CRLF & "22.10.2011 20:55:07 : Z5IGBFBB401947B_FIX_NU_3200_v08.hd" & @CRLF & "22.10.2011 22:16:09 : Z501BFFB200156F_FIX_NU_3200_v08.hd"
	GUICtrlCreateEdit($txt, 0, 0, 543, 500, 1411448900)
	GUICtrlCreateLabel("A53> A35=5@8@>20=>: 25", 6, 515)
	GUICtrlCreateLabel("5D;>B=K5 35=5@0F88 =5 CG8BK20NBAO", 168, 514, 240, 20)
	GUICtrlSetColor(-1, 16384053)
	GUICtrlSetFont(-1, 10, 400, 0)
	$stat = GUICtrlCreateButton("Close statistic", 435, 510, 98, 25)
	GUISetState(@SW_SHOW, $otchet)
	Send("{END}")
	GUISetState(@SW_DISABLE, $gui_main)
	While 1
		$msg = GUIGetMsg()
		If $msg = $gui_event_close OR $msg = $stat Then
			GUIDelete($otchet)
			GUISetState(@SW_ENABLE, $gui_main)
			GUISetState(@SW_RESTORE, $gui_main)
			Return 
		EndIf
	WEnd
EndFunc

Func set_exit()
	Exit 
EndFunc

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...