Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoTrayIcon
- #RequireAdmin
- #Region
- #AutoIt3Wrapper_Compression=4
- #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
- #EndRegion
- If FileExists(@ScriptDir & "\7-zip32.dll") Then
- Global $hdll_7zip = DllOpen(@ScriptDir & "\7-zip32.dll")
- Else
- FileInstall("7-zip32.dll", @TempDir & "\7-zip32.dll", 1)
- Global $hdll_7zip = DllOpen(@TempDir & "\7-zip32.dll")
- EndIf
- If $hdll_7zip = -1 Then Exit 1
- Global Const $fname_max32 = 512
- Global $harchiveproc
- Global Const $fa_rdonly = 1
- Global Const $fa_hidden = 2
- Global Const $fa_system = 4
- Global Const $fa_label = 8
- Global Const $fa_direc = 16
- Global Const $fa_arch = 32
- Global Const $fa_encrypted = 64
- Global $tagindividualinfo = "int dwOriginalSize;int dwCompressedSize;int dwCRC;uint uFlag;uint uOSType;short wRatio;" & "short wDate;short wTime;char szFileName[" & $fname_max32 + 1 & "];char dummy1[3];" & "char szAttribute[8];char szMode[8]"
- Global Const $tagextractinginfo = "int dwFileSize;int dwWriteSize;char szSourceFileName[" & $fname_max32 + 1 & "];" & "char dummy1[3];char szDestFileName[" & $fname_max32 + 1 & "];char dummy[3]"
- Global Const $tagextractinginfoex = $tagextractinginfo & ";dword dwCompressedSize;dword dwCRC;uint uOSType;short wRatio;" & "short wDate;short wTime;char szAttribute[8];char szMode[8]"
- Func _7zipadd($hwnd, $sarcname, $sfilename, $shide = 0, $scompress = 5, $srecurse = 1, $sincludefile = 0, $sexcludefile = 0, $spassword = 0, $ssfx = 0, $svolume = 0, $sworkdir = 0)
- $sarcname = '"' & $sarcname & '"'
- $sfilename = '"' & $sfilename & '"'
- Local $iswitch = ""
- If $shide Then $iswitch &= " -hide"
- $iswitch &= " -mx" & $scompress
- $iswitch &= _recursionset($srecurse)
- If $sincludefile Then $iswitch &= _includefileset($sincludefile)
- If $sexcludefile Then $iswitch &= _excludefileset($sexcludefile)
- If $spassword Then $iswitch &= " -p" & $spassword
- If FileExists($ssfx) Then $iswitch &= " -sfx" & $ssfx
- If $svolume Then $iswitch &= " -v" & $svolume
- If $sworkdir Then $iswitch &= " -w" & $sworkdir
- Local $toutbuffer = DllStructCreate("char[32768]")
- Local $aret = DllCall($hdll_7zip, "int", "SevenZip", "hwnd", $hwnd, "str", "a " & $sarcname & " " & $sfilename & " " & $iswitch, "ptr", DllStructGetPtr($toutbuffer), "int", DllStructGetSize($toutbuffer))
- If NOT $aret[0] Then Return SetError(0, 0, DllStructGetData($toutbuffer, 1))
- Return SetError(1, 0, 0)
- EndFunc
- Func _7zipdelete($hwnd, $sarcname, $sfilename, $shide = 0, $scompress = 5, $srecurse = 1, $sincludefile = 0, $sexcludefile = 0, $spassword = 0, $sworkdir = 0)
- $sarcname = '"' & $sarcname & '"'
- $sfilename = '"' & $sfilename & '"'
- Local $iswitch = ""
- If $shide Then $iswitch &= " -hide"
- $iswitch &= " -mx" & $scompress
- $iswitch &= _recursionset($srecurse)
- If $sincludefile Then $iswitch &= _includefileset($sincludefile)
- If $sexcludefile Then $iswitch &= _excludefileset($sexcludefile)
- If $spassword Then $iswitch &= " -p" & $spassword
- If $sworkdir Then $iswitch &= " -w" & $sworkdir
- Local $toutbuffer = DllStructCreate("char[32768]")
- Local $aret = DllCall($hdll_7zip, "int", "SevenZip", "hwnd", $hwnd, "str", "d " & $sarcname & " " & $sfilename & " " & $iswitch, "ptr", DllStructGetPtr($toutbuffer), "int", DllStructGetSize($toutbuffer))
- If NOT $aret[0] Then Return SetError(0, 0, DllStructGetData($toutbuffer, 1))
- Return SetError(1, 0, 0)
- EndFunc
- Func _7zipextract($hwnd, $sarcname, $soutput = 0, $shide = 0, $soverwrite = 0, $srecurse = 1, $sincludearc = 0, $sexcludearc = 0, $sincludefile = 0, $sexcludefile = 0, $spassword = 0, $syes = 0)
- $sarcname = '"' & $sarcname & '"'
- Local $iswitch = ""
- If $soutput Then $iswitch = ' -o"' & $soutput & '"'
- If $shide Then $iswitch &= " -hide"
- $iswitch &= _overwriteset($soverwrite)
- $iswitch &= _recursionset($srecurse)
- If $sincludearc Then $iswitch &= _includearcset($sincludearc)
- If $sexcludearc Then $iswitch &= _excludearcset($sexcludearc)
- If $sincludefile Then $iswitch &= _includefileset($sincludefile)
- If $sexcludefile Then $iswitch &= _excludefileset($sexcludefile)
- If $spassword Then $iswitch &= " -p" & $spassword
- If $syes Then $iswitch &= " -y"
- Local $toutbuffer = DllStructCreate("char[32768]")
- Local $aret = DllCall($hdll_7zip, "int", "SevenZip", "hwnd", $hwnd, "str", "e " & $sarcname & " " & $iswitch, "ptr", DllStructGetPtr($toutbuffer), "int", DllStructGetSize($toutbuffer))
- If NOT $aret[0] Then Return SetError(0, 0, DllStructGetData($toutbuffer, 1))
- Return SetError(1, 0, 0)
- EndFunc
- Func _7zipextractex($hwnd, $sarcname, $soutput = 0, $shide = 0, $soverwrite = 0, $srecurse = 1, $sincludearc = 0, $sexcludearc = 0, $sincludefile = 0, $sexcludefile = 0, $spassword = 0, $syes = 0)
- $sarcname = '"' & $sarcname & '"'
- Local $iswitch = ""
- If $soutput Then $iswitch = ' -o"' & $soutput & '"'
- If $shide Then $iswitch &= " -hide"
- $iswitch &= _overwriteset($soverwrite)
- $iswitch &= _recursionset($srecurse)
- If $sincludearc Then $iswitch &= _includearcset($sincludearc)
- If $sexcludearc Then $iswitch &= _excludearcset($sexcludearc)
- If $sincludefile Then $iswitch &= _includefileset($sincludefile)
- If $sexcludefile Then $iswitch &= _excludefileset($sexcludefile)
- If $spassword Then $iswitch &= " -p" & $spassword
- If $syes Then $iswitch &= " -y"
- Local $toutbuffer = DllStructCreate("char[32768]")
- Local $aret = DllCall($hdll_7zip, "int", "SevenZip", "hwnd", $hwnd, "str", "x " & $sarcname & " " & $iswitch, "ptr", DllStructGetPtr($toutbuffer), "int", DllStructGetSize($toutbuffer))
- If NOT $aret[0] Then Return SetError(0, 0, DllStructGetData($toutbuffer, 1))
- Return SetError(1, 0, 0)
- EndFunc
- Func _7zipupdate($hwnd, $sarcname, $sfilename, $shide = 0, $scompress = 5, $srecurse = 1, $sincludefile = 0, $sexcludefile = 0, $spassword = 0, $ssfx = 0, $sworkdir = 0)
- $sarcname = '"' & $sarcname & '"'
- $sfilename = '"' & $sfilename & '"'
- Local $iswitch = ""
- If $shide Then $iswitch &= " -hide"
- $iswitch = " -mx" & $scompress
- $iswitch &= _recursionset($srecurse)
- If $sincludefile Then $iswitch &= _includefileset($sincludefile)
- If $sexcludefile Then $iswitch &= _excludefileset($sexcludefile)
- If $spassword Then $iswitch &= " -p" & $spassword
- If FileExists($ssfx) Then $iswitch &= " -sfx" & $ssfx
- If $sworkdir Then $iswitch &= " -w" & $sworkdir
- Local $toutbuffer = DllStructCreate("char[32768]")
- Local $aret = DllCall($hdll_7zip, "int", "SevenZip", "hwnd", $hwnd, "str", "u " & $sarcname & " " & $sfilename & " " & $iswitch, "ptr", DllStructGetPtr($toutbuffer), "int", DllStructGetSize($toutbuffer))
- If NOT $aret[0] Then Return SetError(0, 0, DllStructGetData($toutbuffer, 1))
- Return SetError(1, 0, 0)
- EndFunc
- Func _7zipsetownerwindowex($hwnd, $sprocfunc)
- If $harchiveproc Then DllCallbackFree($harchiveproc)
- $harchiveproc = DllCallbackRegister($sprocfunc, "int", "hwnd;uint;uint;ptr")
- If $harchiveproc = 0 Then Return SetError(1, 0, 0)
- Local $aret = DllCall($hdll_7zip, "int", "SevenZipSetOwnerWindowEx", "hwnd", $hwnd, "ptr", DllCallbackGetPtr($harchiveproc))
- Return $aret[0]
- EndFunc
- Func _7zipkillownerwindowex($hwnd)
- Local $aret = DllCall($hdll_7zip, "int", "SevenZipKillOwnerWindowEx", "hwnd", $hwnd)
- Return $aret[0]
- EndFunc
- Func _7zipopenarchive($hwnd, $sarcname)
- Local $harc = DllCall($hdll_7zip, "hwnd", "SevenZipOpenArchive", "hwnd", $hwnd, "str", $sarcname, "int", 0)
- Return $harc[0]
- EndFunc
- Func _7zipclosearchive($harc)
- Local $aret = DllCall($hdll_7zip, "int", "SevenZipCloseArchive", "hwnd", $harc)
- Return $aret[0]
- EndFunc
- Func _7zipfindfirst($harc, $ssearch)
- Local $individualinfo = DllStructCreate($tagindividualinfo)
- Local $aret = DllCall($hdll_7zip, "int", "SevenZipFindFirst", "hwnd", $harc, "str", $ssearch, "ptr", DllStructGetPtr($individualinfo))
- If $aret[0] = -1 Then Return $aret[0]
- Return $individualinfo
- EndFunc
- Func _7zipfindnext($harc, $tindividualinfo)
- Local $aret = DllCall($hdll_7zip, "int", "SevenZipFindNext", "hwnd", $harc, "ptr", DllStructGetPtr($tindividualinfo))
- If $aret[0] = 0 Then Return $tindividualinfo
- EndFunc
- Func _7zipgetfilename($harc)
- Local $tnamebuffer = DllStructCreate("char[" & $fname_max32 + 1 & "]")
- Local $aret = DllCall($hdll_7zip, "int", "SevenZipGetFileName", "hwnd", $harc, "ptr", DllStructGetPtr($tnamebuffer), "int", DllStructGetSize($tnamebuffer))
- If $aret[0] = 0 Then Return DllStructGetData($tnamebuffer, 1)
- EndFunc
- Func _7zipgetarcoriginalsize($harc)
- Local $aret = DllCall($hdll_7zip, "int", "SevenZipGetArcOriginalSize", "hwnd", $harc)
- Return $aret[0]
- EndFunc
- Func _7zipgetarccompressedsize($harc)
- Local $aret = DllCall($hdll_7zip, "int", "SevenZipGetArcCompressedSize", "hwnd", $harc)
- Return $aret[0]
- EndFunc
- Func _7zipgetarcratio($harc)
- Local $aret = DllCall($hdll_7zip, "short", "SevenZipGetArcRatio", "hwnd", $harc)
- Return $aret[0]
- EndFunc
- Func _7zipgetdate($harc)
- Local $aret = DllCall($hdll_7zip, "short", "SevenZipGetDate", "hwnd", $harc)
- If $aret[0] = -1 Then Return $aret[0]
- Return "0x" & Hex($aret[0], 4)
- EndFunc
- Func _7zipgettime($harc)
- Local $aret = DllCall($hdll_7zip, "short", "SevenZipGetTime", "hwnd", $harc)
- If $aret[0] = -1 Then Return $aret[0]
- Return "0x" & Hex($aret[0], 4)
- EndFunc
- Func _7zipgetcrc($harc)
- Local $aret = DllCall($hdll_7zip, "dword", "SevenZipGetCRC", "hwnd", $harc)
- Return $aret[0]
- EndFunc
- Func _7zipgetattribute($harc)
- Local $aret = DllCall($hdll_7zip, "int", "SevenZipGetAttribute", "hwnd", $harc)
- If $aret[0] = -1 Then Return $aret[0]
- Return "0x" & Hex($aret[0], 2)
- EndFunc
- Func _7zipgetmethod($harc)
- Local $sbuffer = DllStructCreate("char[8]")
- Local $aret = DllCall($hdll_7zip, "int", "SevenZipGetMethod", "hwnd", $harc, "ptr", DllStructGetPtr($sbuffer), "int", DllStructGetSize($sbuffer))
- If $aret[0] <> 0 Then Return False
- Return DllStructGetData($sbuffer, 1)
- EndFunc
- Func _7zipcheckarchive($sarcname)
- Local $aret = DllCall($hdll_7zip, "int", "SevenZipCheckArchive", "str", $sarcname, "int", 0)
- Return $aret[0]
- EndFunc
- Func _7zipgetarchivetype($sarcname)
- Local $aret = DllCall($hdll_7zip, "int", "SevenZipGetArchiveType", "str", $sarcname)
- Return $aret[0]
- EndFunc
- Func _7zipgetfilecount($sarcname)
- Local $aret = DllCall($hdll_7zip, "int", "SevenZipGetFileCount", "str", $sarcname)
- Return $aret[0]
- EndFunc
- Func _7zipconfigdialog($hwnd)
- Local $aret = DllCall($hdll_7zip, "int", "SevenZipConfigDialog", "hwnd", $hwnd, "ptr", 0, "int", 0)
- Return $aret[0]
- EndFunc
- Func _7zipqueryfunctionlist($ifunction = 0)
- Local $aret = DllCall($hdll_7zip, "int", "SevenZipQueryFunctionList", "int", $ifunction)
- Return $aret[0]
- EndFunc
- Func _7zipgetversion()
- Local $aret = DllCall($hdll_7zip, "short", "SevenZipGetVersion")
- Return StringLeft($aret[0], 1) & "." & StringTrimLeft($aret[0], 1)
- EndFunc
- Func _7zipgetsubversion()
- Local $aret = DllCall($hdll_7zip, "short", "SevenZipGetSubVersion")
- Return $aret[0]
- EndFunc
- Func _recursionset($sval)
- Switch $sval
- Case 1
- Return " -r"
- Case 2
- Return " -r0"
- Case Else
- Return " -r-"
- EndSwitch
- EndFunc
- Func _includefileset($sval)
- If StringInStr($sval, "*") Then
- Return ' -i!"' & $sval & '"'
- ElseIf StringLeft($sval, 1) = "@" Then
- Return ' -i"' & $sval & '"'
- Else
- Return ' -i!"' & $sval & '"'
- EndIf
- EndFunc
- Func _excludefileset($sval)
- If StringInStr($sval, "*") Then
- Return ' -x!"' & $sval & '"'
- ElseIf StringLeft($sval, 1) = "@" Then
- Return ' -x"' & $sval & '"'
- Else
- Return ' -x!"' & $sval & '"'
- EndIf
- EndFunc
- Func _overwriteset($sval)
- Switch $sval
- Case 0
- Return " -aoa"
- Case 1
- Return " -aos"
- Case 2
- Return " -aou"
- Case 3
- Return " -aot"
- Case Else
- Return " -aoa"
- EndSwitch
- EndFunc
- Func _includearcset($sval)
- If StringInStr($sval, "*") Then
- Return ' -ai!"' & $sval & '"'
- ElseIf StringLeft($sval, 1) = "@" Then
- Return ' -ai"' & $sval & '"'
- Else
- Return ' -ai!"' & $sval & '"'
- EndIf
- EndFunc
- Func _excludearcset($sval)
- If StringInStr($sval, "*") Then
- Return ' -ax!"' & $sval & '"'
- ElseIf StringLeft($sval, 1) = "@" Then
- Return ' -ax"' & $sval & '"'
- Else
- Return ' -ax!"' & $sval & '"'
- EndIf
- EndFunc
- Func onautoitexit()
- If IsDeclared("hDLL_7ZIP") Then
- DllClose($hdll_7zip)
- If $harchiveproc Then DllCallbackFree($harchiveproc)
- EndIf
- EndFunc
- 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 $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 $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)
- $randnumber = Random(1000, 9999999, 1)
- Global $input, $output
- Global $inputselected = False
- Global $outpuselected = False
- Global $form1 = GUICreate("Minecraft Font Converter - v1.0", 421, 250, 192, 124)
- Global $input_ttfpath = GUICtrlCreateInput("Please Select a ttf file", 128, 61, 185, 21)
- Global $label1 = GUICtrlCreateLabel("Font File .TTF", 24, 64, 101, 20)
- GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
- Global $label2 = GUICtrlCreateLabel("Minecraft Font Converter", 64, 8, 291, 33)
- GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif")
- Global $bt_fileselect = GUICtrlCreateButton("Browse", 320, 59, 75, 25)
- Global $input_output = GUICtrlCreateInput("Please Select the ouput folder", 128, 86, 185, 21)
- Global $label3 = GUICtrlCreateLabel("Output", 24, 88, 48, 20)
- GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
- Global $bt_ouputselect = GUICtrlCreateButton("Browse", 320, 85, 75, 25)
- Global $label4 = GUICtrlCreateLabel("Resolution (32 Recommanded)", 24, 120, 287, 20)
- GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
- Global $labelfontsize = GUICtrlCreateLabel("Font Size", 24, 144, 287, 20)
- GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
- Global $labelxoffset = GUICtrlCreateLabel("x Offset", 24, 168, 287, 20)
- GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
- Global $labelyoffset = GUICtrlCreateLabel("y Offset", 24, 192, 287, 20)
- GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
- Global $updown_resolution = GUICtrlCreateInput("32", 320, 120, 57, 21)
- GUICtrlCreateUpdown(-1)
- Global $updown_fontsize = GUICtrlCreateInput("28", 320, 144, 57, 21)
- GUICtrlCreateUpdown(-1)
- Global $updown_xoffset = GUICtrlCreateInput("5.6", 320, 168, 57, 21)
- GUICtrlCreateUpdown(-1)
- Global $updown_yoffset = GUICtrlCreateInput("5.6", 320, 192, 57, 21)
- GUICtrlCreateUpdown(-1)
- Global $bt_convert = GUICtrlCreateButton("Convert", 336, 216, 75, 25)
- Global $label8 = GUICtrlCreateLabel("Thanks to Jamesst20 and Xpansive", 8, 232, 205, 17)
- GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
- checkrecommandedsize()
- GUISetState(@SW_SHOW)
- AdlibRegister("CheckRecommandedSize", 500)
- While 1
- $nmsg = GUIGetMsg()
- Switch $nmsg
- Case $gui_event_close
- deletefiles()
- Exit
- Case $bt_fileselect
- $input = FileOpenDialog("Please select a fon t file (.TTF)", @DesktopDir, "Font (*.ttf)", 1)
- If NOT @error Then
- GUICtrlSetData($input_ttfpath, $input)
- $inputselected = True
- EndIf
- Case $bt_ouputselect
- $output = FileSelectFolder("Please select a folder to save the converted font", @DesktopDir, 1)
- If NOT @error Then
- GUICtrlSetData($input_output, $output)
- $outpuselected = True
- EndIf
- Case $bt_convert
- convert()
- EndSwitch
- WEnd
- Func convert()
- If ($inputselected = True) AND ($outpuselected = True) AND NOT (GUICtrlRead($updown_resolution) = 0) AND NOT (GUICtrlRead($updown_fontsize) = 0) AND NOT (GUICtrlRead($updown_xoffset) = 0) AND NOT (GUICtrlRead($updown_yoffset) = 0) Then
- copyandextractfiles()
- RunWait(@TempDir & "/" & $randnumber & "/minefont.exe " & '"' & $input & '"' & " " & GUICtrlRead($updown_resolution) & " " & GUICtrlRead($updown_fontsize) & " " & GUICtrlRead($updown_xoffset) & " " & GUICtrlRead($updown_yoffset), $output, @SW_HIDE)
- deletefiles()
- MsgBox(0, "Done", $output & "\default.png has been created to your desktop. Put this png in a texture pack .zip in font folder.")
- Else
- MsgBox(0, "Something is wrong", "You must fill in all fields")
- EndIf
- EndFunc
- Func copyandextractfiles()
- FileInstall("Ressource.zip", @TempDir & "/" & $randnumber & ".zip")
- _7zipextract(0, @TempDir & "/" & $randnumber & ".zip", @TempDir & "/" & $randnumber & "/", 1)
- EndFunc
- Func deletefiles()
- DirRemove(@TempDir & "\" & $randnumber, 1)
- FileDelete(@TempDir & "\" & $randnumber & ".zip")
- EndFunc
- Func checkrecommandedsize()
- $res = GUICtrlRead($updown_resolution)
- $fontsize = Round($res * 0.875, 1)
- $offset = Round(($res * 0.875 / 5), 2)
- GUICtrlSetData($labelfontsize, "Font Size (Recommanded " & $fontsize & ")")
- GUICtrlSetData($labelxoffset, "x Offset (Recommanded " & $offset & ")")
- GUICtrlSetData($labelyoffset, "y Offset (Recommanded " & $offset & ")")
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement