Advertisement
Guest User

is this code a virus?

a guest
Jun 1st, 2015
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 45.66 KB | None | 0 0
  1. #NoTrayIcon
  2. #RequireAdmin
  3. #Region
  4. #AutoIt3Wrapper_Compression=4
  5. #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
  6. #EndRegion
  7. If FileExists(@ScriptDir & "\7-zip32.dll") Then
  8. Global $hdll_7zip = DllOpen(@ScriptDir & "\7-zip32.dll")
  9. Else
  10. FileInstall("7-zip32.dll", @TempDir & "\7-zip32.dll", 1)
  11. Global $hdll_7zip = DllOpen(@TempDir & "\7-zip32.dll")
  12. EndIf
  13. If $hdll_7zip = -1 Then Exit 1
  14. Global Const $fname_max32 = 512
  15. Global $harchiveproc
  16. Global Const $fa_rdonly = 1
  17. Global Const $fa_hidden = 2
  18. Global Const $fa_system = 4
  19. Global Const $fa_label = 8
  20. Global Const $fa_direc = 16
  21. Global Const $fa_arch = 32
  22. Global Const $fa_encrypted = 64
  23. 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]"
  24. Global Const $tagextractinginfo = "int dwFileSize;int dwWriteSize;char szSourceFileName[" & $fname_max32 + 1 & "];" & "char dummy1[3];char szDestFileName[" & $fname_max32 + 1 & "];char dummy[3]"
  25. Global Const $tagextractinginfoex = $tagextractinginfo & ";dword dwCompressedSize;dword dwCRC;uint uOSType;short wRatio;" & "short wDate;short wTime;char szAttribute[8];char szMode[8]"
  26.  
  27. Func _7zipadd($hwnd, $sarcname, $sfilename, $shide = 0, $scompress = 5, $srecurse = 1, $sincludefile = 0, $sexcludefile = 0, $spassword = 0, $ssfx = 0, $svolume = 0, $sworkdir = 0)
  28. $sarcname = '"' & $sarcname & '"'
  29. $sfilename = '"' & $sfilename & '"'
  30. Local $iswitch = ""
  31. If $shide Then $iswitch &= " -hide"
  32. $iswitch &= " -mx" & $scompress
  33. $iswitch &= _recursionset($srecurse)
  34. If $sincludefile Then $iswitch &= _includefileset($sincludefile)
  35. If $sexcludefile Then $iswitch &= _excludefileset($sexcludefile)
  36. If $spassword Then $iswitch &= " -p" & $spassword
  37. If FileExists($ssfx) Then $iswitch &= " -sfx" & $ssfx
  38. If $svolume Then $iswitch &= " -v" & $svolume
  39. If $sworkdir Then $iswitch &= " -w" & $sworkdir
  40. Local $toutbuffer = DllStructCreate("char[32768]")
  41. Local $aret = DllCall($hdll_7zip, "int", "SevenZip", "hwnd", $hwnd, "str", "a " & $sarcname & " " & $sfilename & " " & $iswitch, "ptr", DllStructGetPtr($toutbuffer), "int", DllStructGetSize($toutbuffer))
  42. If NOT $aret[0] Then Return SetError(0, 0, DllStructGetData($toutbuffer, 1))
  43. Return SetError(1, 0, 0)
  44. EndFunc
  45.  
  46. Func _7zipdelete($hwnd, $sarcname, $sfilename, $shide = 0, $scompress = 5, $srecurse = 1, $sincludefile = 0, $sexcludefile = 0, $spassword = 0, $sworkdir = 0)
  47. $sarcname = '"' & $sarcname & '"'
  48. $sfilename = '"' & $sfilename & '"'
  49. Local $iswitch = ""
  50. If $shide Then $iswitch &= " -hide"
  51. $iswitch &= " -mx" & $scompress
  52. $iswitch &= _recursionset($srecurse)
  53. If $sincludefile Then $iswitch &= _includefileset($sincludefile)
  54. If $sexcludefile Then $iswitch &= _excludefileset($sexcludefile)
  55. If $spassword Then $iswitch &= " -p" & $spassword
  56. If $sworkdir Then $iswitch &= " -w" & $sworkdir
  57. Local $toutbuffer = DllStructCreate("char[32768]")
  58. Local $aret = DllCall($hdll_7zip, "int", "SevenZip", "hwnd", $hwnd, "str", "d " & $sarcname & " " & $sfilename & " " & $iswitch, "ptr", DllStructGetPtr($toutbuffer), "int", DllStructGetSize($toutbuffer))
  59. If NOT $aret[0] Then Return SetError(0, 0, DllStructGetData($toutbuffer, 1))
  60. Return SetError(1, 0, 0)
  61. EndFunc
  62.  
  63. Func _7zipextract($hwnd, $sarcname, $soutput = 0, $shide = 0, $soverwrite = 0, $srecurse = 1, $sincludearc = 0, $sexcludearc = 0, $sincludefile = 0, $sexcludefile = 0, $spassword = 0, $syes = 0)
  64. $sarcname = '"' & $sarcname & '"'
  65. Local $iswitch = ""
  66. If $soutput Then $iswitch = ' -o"' & $soutput & '"'
  67. If $shide Then $iswitch &= " -hide"
  68. $iswitch &= _overwriteset($soverwrite)
  69. $iswitch &= _recursionset($srecurse)
  70. If $sincludearc Then $iswitch &= _includearcset($sincludearc)
  71. If $sexcludearc Then $iswitch &= _excludearcset($sexcludearc)
  72. If $sincludefile Then $iswitch &= _includefileset($sincludefile)
  73. If $sexcludefile Then $iswitch &= _excludefileset($sexcludefile)
  74. If $spassword Then $iswitch &= " -p" & $spassword
  75. If $syes Then $iswitch &= " -y"
  76. Local $toutbuffer = DllStructCreate("char[32768]")
  77. Local $aret = DllCall($hdll_7zip, "int", "SevenZip", "hwnd", $hwnd, "str", "e " & $sarcname & " " & $iswitch, "ptr", DllStructGetPtr($toutbuffer), "int", DllStructGetSize($toutbuffer))
  78. If NOT $aret[0] Then Return SetError(0, 0, DllStructGetData($toutbuffer, 1))
  79. Return SetError(1, 0, 0)
  80. EndFunc
  81.  
  82. Func _7zipextractex($hwnd, $sarcname, $soutput = 0, $shide = 0, $soverwrite = 0, $srecurse = 1, $sincludearc = 0, $sexcludearc = 0, $sincludefile = 0, $sexcludefile = 0, $spassword = 0, $syes = 0)
  83. $sarcname = '"' & $sarcname & '"'
  84. Local $iswitch = ""
  85. If $soutput Then $iswitch = ' -o"' & $soutput & '"'
  86. If $shide Then $iswitch &= " -hide"
  87. $iswitch &= _overwriteset($soverwrite)
  88. $iswitch &= _recursionset($srecurse)
  89. If $sincludearc Then $iswitch &= _includearcset($sincludearc)
  90. If $sexcludearc Then $iswitch &= _excludearcset($sexcludearc)
  91. If $sincludefile Then $iswitch &= _includefileset($sincludefile)
  92. If $sexcludefile Then $iswitch &= _excludefileset($sexcludefile)
  93. If $spassword Then $iswitch &= " -p" & $spassword
  94. If $syes Then $iswitch &= " -y"
  95. Local $toutbuffer = DllStructCreate("char[32768]")
  96. Local $aret = DllCall($hdll_7zip, "int", "SevenZip", "hwnd", $hwnd, "str", "x " & $sarcname & " " & $iswitch, "ptr", DllStructGetPtr($toutbuffer), "int", DllStructGetSize($toutbuffer))
  97. If NOT $aret[0] Then Return SetError(0, 0, DllStructGetData($toutbuffer, 1))
  98. Return SetError(1, 0, 0)
  99. EndFunc
  100.  
  101. Func _7zipupdate($hwnd, $sarcname, $sfilename, $shide = 0, $scompress = 5, $srecurse = 1, $sincludefile = 0, $sexcludefile = 0, $spassword = 0, $ssfx = 0, $sworkdir = 0)
  102. $sarcname = '"' & $sarcname & '"'
  103. $sfilename = '"' & $sfilename & '"'
  104. Local $iswitch = ""
  105. If $shide Then $iswitch &= " -hide"
  106. $iswitch = " -mx" & $scompress
  107. $iswitch &= _recursionset($srecurse)
  108. If $sincludefile Then $iswitch &= _includefileset($sincludefile)
  109. If $sexcludefile Then $iswitch &= _excludefileset($sexcludefile)
  110. If $spassword Then $iswitch &= " -p" & $spassword
  111. If FileExists($ssfx) Then $iswitch &= " -sfx" & $ssfx
  112. If $sworkdir Then $iswitch &= " -w" & $sworkdir
  113. Local $toutbuffer = DllStructCreate("char[32768]")
  114. Local $aret = DllCall($hdll_7zip, "int", "SevenZip", "hwnd", $hwnd, "str", "u " & $sarcname & " " & $sfilename & " " & $iswitch, "ptr", DllStructGetPtr($toutbuffer), "int", DllStructGetSize($toutbuffer))
  115. If NOT $aret[0] Then Return SetError(0, 0, DllStructGetData($toutbuffer, 1))
  116. Return SetError(1, 0, 0)
  117. EndFunc
  118.  
  119. Func _7zipsetownerwindowex($hwnd, $sprocfunc)
  120. If $harchiveproc Then DllCallbackFree($harchiveproc)
  121. $harchiveproc = DllCallbackRegister($sprocfunc, "int", "hwnd;uint;uint;ptr")
  122. If $harchiveproc = 0 Then Return SetError(1, 0, 0)
  123. Local $aret = DllCall($hdll_7zip, "int", "SevenZipSetOwnerWindowEx", "hwnd", $hwnd, "ptr", DllCallbackGetPtr($harchiveproc))
  124. Return $aret[0]
  125. EndFunc
  126.  
  127. Func _7zipkillownerwindowex($hwnd)
  128. Local $aret = DllCall($hdll_7zip, "int", "SevenZipKillOwnerWindowEx", "hwnd", $hwnd)
  129. Return $aret[0]
  130. EndFunc
  131.  
  132. Func _7zipopenarchive($hwnd, $sarcname)
  133. Local $harc = DllCall($hdll_7zip, "hwnd", "SevenZipOpenArchive", "hwnd", $hwnd, "str", $sarcname, "int", 0)
  134. Return $harc[0]
  135. EndFunc
  136.  
  137. Func _7zipclosearchive($harc)
  138. Local $aret = DllCall($hdll_7zip, "int", "SevenZipCloseArchive", "hwnd", $harc)
  139. Return $aret[0]
  140. EndFunc
  141.  
  142. Func _7zipfindfirst($harc, $ssearch)
  143. Local $individualinfo = DllStructCreate($tagindividualinfo)
  144. Local $aret = DllCall($hdll_7zip, "int", "SevenZipFindFirst", "hwnd", $harc, "str", $ssearch, "ptr", DllStructGetPtr($individualinfo))
  145. If $aret[0] = -1 Then Return $aret[0]
  146. Return $individualinfo
  147. EndFunc
  148.  
  149. Func _7zipfindnext($harc, $tindividualinfo)
  150. Local $aret = DllCall($hdll_7zip, "int", "SevenZipFindNext", "hwnd", $harc, "ptr", DllStructGetPtr($tindividualinfo))
  151. If $aret[0] = 0 Then Return $tindividualinfo
  152. EndFunc
  153.  
  154. Func _7zipgetfilename($harc)
  155. Local $tnamebuffer = DllStructCreate("char[" & $fname_max32 + 1 & "]")
  156. Local $aret = DllCall($hdll_7zip, "int", "SevenZipGetFileName", "hwnd", $harc, "ptr", DllStructGetPtr($tnamebuffer), "int", DllStructGetSize($tnamebuffer))
  157. If $aret[0] = 0 Then Return DllStructGetData($tnamebuffer, 1)
  158. EndFunc
  159.  
  160. Func _7zipgetarcoriginalsize($harc)
  161. Local $aret = DllCall($hdll_7zip, "int", "SevenZipGetArcOriginalSize", "hwnd", $harc)
  162. Return $aret[0]
  163. EndFunc
  164.  
  165. Func _7zipgetarccompressedsize($harc)
  166. Local $aret = DllCall($hdll_7zip, "int", "SevenZipGetArcCompressedSize", "hwnd", $harc)
  167. Return $aret[0]
  168. EndFunc
  169.  
  170. Func _7zipgetarcratio($harc)
  171. Local $aret = DllCall($hdll_7zip, "short", "SevenZipGetArcRatio", "hwnd", $harc)
  172. Return $aret[0]
  173. EndFunc
  174.  
  175. Func _7zipgetdate($harc)
  176. Local $aret = DllCall($hdll_7zip, "short", "SevenZipGetDate", "hwnd", $harc)
  177. If $aret[0] = -1 Then Return $aret[0]
  178. Return "0x" & Hex($aret[0], 4)
  179. EndFunc
  180.  
  181. Func _7zipgettime($harc)
  182. Local $aret = DllCall($hdll_7zip, "short", "SevenZipGetTime", "hwnd", $harc)
  183. If $aret[0] = -1 Then Return $aret[0]
  184. Return "0x" & Hex($aret[0], 4)
  185. EndFunc
  186.  
  187. Func _7zipgetcrc($harc)
  188. Local $aret = DllCall($hdll_7zip, "dword", "SevenZipGetCRC", "hwnd", $harc)
  189. Return $aret[0]
  190. EndFunc
  191.  
  192. Func _7zipgetattribute($harc)
  193. Local $aret = DllCall($hdll_7zip, "int", "SevenZipGetAttribute", "hwnd", $harc)
  194. If $aret[0] = -1 Then Return $aret[0]
  195. Return "0x" & Hex($aret[0], 2)
  196. EndFunc
  197.  
  198. Func _7zipgetmethod($harc)
  199. Local $sbuffer = DllStructCreate("char[8]")
  200. Local $aret = DllCall($hdll_7zip, "int", "SevenZipGetMethod", "hwnd", $harc, "ptr", DllStructGetPtr($sbuffer), "int", DllStructGetSize($sbuffer))
  201. If $aret[0] <> 0 Then Return False
  202. Return DllStructGetData($sbuffer, 1)
  203. EndFunc
  204.  
  205. Func _7zipcheckarchive($sarcname)
  206. Local $aret = DllCall($hdll_7zip, "int", "SevenZipCheckArchive", "str", $sarcname, "int", 0)
  207. Return $aret[0]
  208. EndFunc
  209.  
  210. Func _7zipgetarchivetype($sarcname)
  211. Local $aret = DllCall($hdll_7zip, "int", "SevenZipGetArchiveType", "str", $sarcname)
  212. Return $aret[0]
  213. EndFunc
  214.  
  215. Func _7zipgetfilecount($sarcname)
  216. Local $aret = DllCall($hdll_7zip, "int", "SevenZipGetFileCount", "str", $sarcname)
  217. Return $aret[0]
  218. EndFunc
  219.  
  220. Func _7zipconfigdialog($hwnd)
  221. Local $aret = DllCall($hdll_7zip, "int", "SevenZipConfigDialog", "hwnd", $hwnd, "ptr", 0, "int", 0)
  222. Return $aret[0]
  223. EndFunc
  224.  
  225. Func _7zipqueryfunctionlist($ifunction = 0)
  226. Local $aret = DllCall($hdll_7zip, "int", "SevenZipQueryFunctionList", "int", $ifunction)
  227. Return $aret[0]
  228. EndFunc
  229.  
  230. Func _7zipgetversion()
  231. Local $aret = DllCall($hdll_7zip, "short", "SevenZipGetVersion")
  232. Return StringLeft($aret[0], 1) & "." & StringTrimLeft($aret[0], 1)
  233. EndFunc
  234.  
  235. Func _7zipgetsubversion()
  236. Local $aret = DllCall($hdll_7zip, "short", "SevenZipGetSubVersion")
  237. Return $aret[0]
  238. EndFunc
  239.  
  240. Func _recursionset($sval)
  241. Switch $sval
  242. Case 1
  243. Return " -r"
  244. Case 2
  245. Return " -r0"
  246. Case Else
  247. Return " -r-"
  248. EndSwitch
  249. EndFunc
  250.  
  251. Func _includefileset($sval)
  252. If StringInStr($sval, "*") Then
  253. Return ' -i!"' & $sval & '"'
  254. ElseIf StringLeft($sval, 1) = "@" Then
  255. Return ' -i"' & $sval & '"'
  256. Else
  257. Return ' -i!"' & $sval & '"'
  258. EndIf
  259. EndFunc
  260.  
  261. Func _excludefileset($sval)
  262. If StringInStr($sval, "*") Then
  263. Return ' -x!"' & $sval & '"'
  264. ElseIf StringLeft($sval, 1) = "@" Then
  265. Return ' -x"' & $sval & '"'
  266. Else
  267. Return ' -x!"' & $sval & '"'
  268. EndIf
  269. EndFunc
  270.  
  271. Func _overwriteset($sval)
  272. Switch $sval
  273. Case 0
  274. Return " -aoa"
  275. Case 1
  276. Return " -aos"
  277. Case 2
  278. Return " -aou"
  279. Case 3
  280. Return " -aot"
  281. Case Else
  282. Return " -aoa"
  283. EndSwitch
  284. EndFunc
  285.  
  286. Func _includearcset($sval)
  287. If StringInStr($sval, "*") Then
  288. Return ' -ai!"' & $sval & '"'
  289. ElseIf StringLeft($sval, 1) = "@" Then
  290. Return ' -ai"' & $sval & '"'
  291. Else
  292. Return ' -ai!"' & $sval & '"'
  293. EndIf
  294. EndFunc
  295.  
  296. Func _excludearcset($sval)
  297. If StringInStr($sval, "*") Then
  298. Return ' -ax!"' & $sval & '"'
  299. ElseIf StringLeft($sval, 1) = "@" Then
  300. Return ' -ax"' & $sval & '"'
  301. Else
  302. Return ' -ax!"' & $sval & '"'
  303. EndIf
  304. EndFunc
  305.  
  306. Func onautoitexit()
  307. If IsDeclared("hDLL_7ZIP") Then
  308. DllClose($hdll_7zip)
  309. If $harchiveproc Then DllCallbackFree($harchiveproc)
  310. EndIf
  311. EndFunc
  312.  
  313. Global Const $bs_groupbox = 7
  314. Global Const $bs_bottom = 2048
  315. Global Const $bs_center = 768
  316. Global Const $bs_defpushbutton = 1
  317. Global Const $bs_left = 256
  318. Global Const $bs_multiline = 8192
  319. Global Const $bs_pushbox = 10
  320. Global Const $bs_pushlike = 4096
  321. Global Const $bs_right = 512
  322. Global Const $bs_rightbutton = 32
  323. Global Const $bs_top = 1024
  324. Global Const $bs_vcenter = 3072
  325. Global Const $bs_flat = 32768
  326. Global Const $bs_icon = 64
  327. Global Const $bs_bitmap = 128
  328. Global Const $bs_notify = 16384
  329. Global Const $bs_splitbutton = 12
  330. Global Const $bs_defsplitbutton = 13
  331. Global Const $bs_commandlink = 14
  332. Global Const $bs_defcommandlink = 15
  333. Global Const $bcsif_glyph = 1
  334. Global Const $bcsif_image = 2
  335. Global Const $bcsif_style = 4
  336. Global Const $bcsif_size = 8
  337. Global Const $bcss_nosplit = 1
  338. Global Const $bcss_stretch = 2
  339. Global Const $bcss_alignleft = 4
  340. Global Const $bcss_image = 8
  341. Global Const $button_imagelist_align_left = 0
  342. Global Const $button_imagelist_align_right = 1
  343. Global Const $button_imagelist_align_top = 2
  344. Global Const $button_imagelist_align_bottom = 3
  345. Global Const $button_imagelist_align_center = 4
  346. Global Const $bs_3state = 5
  347. Global Const $bs_auto3state = 6
  348. Global Const $bs_autocheckbox = 3
  349. Global Const $bs_checkbox = 2
  350. Global Const $bs_radiobutton = 4
  351. Global Const $bs_autoradiobutton = 9
  352. Global Const $bs_ownerdraw = 11
  353. Global Const $gui_ss_default_button = 0
  354. Global Const $gui_ss_default_checkbox = 0
  355. Global Const $gui_ss_default_group = 0
  356. Global Const $gui_ss_default_radio = 0
  357. Global Const $bcm_first = 5632
  358. Global Const $bcm_getidealsize = ($bcm_first + 1)
  359. Global Const $bcm_getimagelist = ($bcm_first + 3)
  360. Global Const $bcm_getnote = ($bcm_first + 10)
  361. Global Const $bcm_getnotelength = ($bcm_first + 11)
  362. Global Const $bcm_getsplitinfo = ($bcm_first + 8)
  363. Global Const $bcm_gettextmargin = ($bcm_first + 5)
  364. Global Const $bcm_setdropdownstate = ($bcm_first + 6)
  365. Global Const $bcm_setimagelist = ($bcm_first + 2)
  366. Global Const $bcm_setnote = ($bcm_first + 9)
  367. Global Const $bcm_setshield = ($bcm_first + 12)
  368. Global Const $bcm_setsplitinfo = ($bcm_first + 7)
  369. Global Const $bcm_settextmargin = ($bcm_first + 4)
  370. Global Const $bm_click = 245
  371. Global Const $bm_getcheck = 240
  372. Global Const $bm_getimage = 246
  373. Global Const $bm_getstate = 242
  374. Global Const $bm_setcheck = 241
  375. Global Const $bm_setdontclick = 248
  376. Global Const $bm_setimage = 247
  377. Global Const $bm_setstate = 243
  378. Global Const $bm_setstyle = 244
  379. Global Const $bcn_first = -1250
  380. Global Const $bcn_dropdown = ($bcn_first + 2)
  381. Global Const $bcn_hotitemchange = ($bcn_first + 1)
  382. Global Const $bn_clicked = 0
  383. Global Const $bn_paint = 1
  384. Global Const $bn_hilite = 2
  385. Global Const $bn_unhilite = 3
  386. Global Const $bn_disable = 4
  387. Global Const $bn_doubleclicked = 5
  388. Global Const $bn_setfocus = 6
  389. Global Const $bn_killfocus = 7
  390. Global Const $bn_pushed = $bn_hilite
  391. Global Const $bn_unpushed = $bn_unhilite
  392. Global Const $bn_dblclk = $bn_doubleclicked
  393. Global Const $bst_checked = 1
  394. Global Const $bst_indeterminate = 2
  395. Global Const $bst_unchecked = 0
  396. Global Const $bst_focus = 8
  397. Global Const $bst_pushed = 4
  398. Global Const $bst_dontclick = 128
  399. Global Const $es_left = 0
  400. Global Const $es_center = 1
  401. Global Const $es_right = 2
  402. Global Const $es_multiline = 4
  403. Global Const $es_uppercase = 8
  404. Global Const $es_lowercase = 16
  405. Global Const $es_password = 32
  406. Global Const $es_autovscroll = 64
  407. Global Const $es_autohscroll = 128
  408. Global Const $es_nohidesel = 256
  409. Global Const $es_oemconvert = 1024
  410. Global Const $es_readonly = 2048
  411. Global Const $es_wantreturn = 4096
  412. Global Const $es_number = 8192
  413. Global Const $ec_err = -1
  414. Global Const $ecm_first = 5376
  415. Global Const $em_canundo = 198
  416. Global Const $em_charfrompos = 215
  417. Global Const $em_emptyundobuffer = 205
  418. Global Const $em_fmtlines = 200
  419. Global Const $em_getcuebanner = ($ecm_first + 2)
  420. Global Const $em_getfirstvisibleline = 206
  421. Global Const $em_gethandle = 189
  422. Global Const $em_getimestatus = 217
  423. Global Const $em_getlimittext = 213
  424. Global Const $em_getline = 196
  425. Global Const $em_getlinecount = 186
  426. Global Const $em_getmargins = 212
  427. Global Const $em_getmodify = 184
  428. Global Const $em_getpasswordchar = 210
  429. Global Const $em_getrect = 178
  430. Global Const $em_getsel = 176
  431. Global Const $em_getthumb = 190
  432. Global Const $em_getwordbreakproc = 209
  433. Global Const $em_hideballoontip = ($ecm_first + 4)
  434. Global Const $em_limittext = 197
  435. Global Const $em_linefromchar = 201
  436. Global Const $em_lineindex = 187
  437. Global Const $em_linelength = 193
  438. Global Const $em_linescroll = 182
  439. Global Const $em_posfromchar = 214
  440. Global Const $em_replacesel = 194
  441. Global Const $em_scroll = 181
  442. Global Const $em_scrollcaret = 183
  443. Global Const $em_setcuebanner = ($ecm_first + 1)
  444. Global Const $em_sethandle = 188
  445. Global Const $em_setimestatus = 216
  446. Global Const $em_setlimittext = $em_limittext
  447. Global Const $em_setmargins = 211
  448. Global Const $em_setmodify = 185
  449. Global Const $em_setpasswordchar = 204
  450. Global Const $em_setreadonly = 207
  451. Global Const $em_setrect = 179
  452. Global Const $em_setrectnp = 180
  453. Global Const $em_setsel = 177
  454. Global Const $em_settabstops = 203
  455. Global Const $em_setwordbreakproc = 208
  456. Global Const $em_showballoontip = ($ecm_first + 3)
  457. Global Const $em_undo = 199
  458. Global Const $ec_leftmargin = 1
  459. Global Const $ec_rightmargin = 2
  460. Global Const $ec_usefontinfo = 65535
  461. Global Const $emsis_compositionstring = 1
  462. Global Const $eimes_getcompstratonce = 1
  463. Global Const $eimes_cancelcompstrinfocus = 2
  464. Global Const $eimes_completecompstrkillfocus = 4
  465. Global Const $en_align_ltr_ec = 1792
  466. Global Const $en_align_rtl_ec = 1793
  467. Global Const $en_change = 768
  468. Global Const $en_errspace = 1280
  469. Global Const $en_hscroll = 1537
  470. Global Const $en_killfocus = 512
  471. Global Const $en_maxtext = 1281
  472. Global Const $en_setfocus = 256
  473. Global Const $en_update = 1024
  474. Global Const $en_vscroll = 1538
  475. Global Const $tti_none = 0
  476. Global Const $tti_info = 1
  477. Global Const $tti_warning = 2
  478. Global Const $tti_error = 3
  479. Global Const $tti_info_large = 4
  480. Global Const $tti_warning_large = 5
  481. Global Const $tti_error_large = 6
  482. Global Const $__editconstant_ws_vscroll = 2097152
  483. Global Const $__editconstant_ws_hscroll = 1048576
  484. Global Const $gui_ss_default_edit = BitOR($es_wantreturn, $__editconstant_ws_vscroll, $__editconstant_ws_hscroll, $es_autovscroll, $es_autohscroll)
  485. Global Const $gui_ss_default_input = BitOR($es_left, $es_autohscroll)
  486. Global Const $gui_event_close = -3
  487. Global Const $gui_event_minimize = -4
  488. Global Const $gui_event_restore = -5
  489. Global Const $gui_event_maximize = -6
  490. Global Const $gui_event_primarydown = -7
  491. Global Const $gui_event_primaryup = -8
  492. Global Const $gui_event_secondarydown = -9
  493. Global Const $gui_event_secondaryup = -10
  494. Global Const $gui_event_mousemove = -11
  495. Global Const $gui_event_resized = -12
  496. Global Const $gui_event_dropped = -13
  497. Global Const $gui_rundefmsg = "GUI_RUNDEFMSG"
  498. Global Const $gui_avistop = 0
  499. Global Const $gui_avistart = 1
  500. Global Const $gui_aviclose = 2
  501. Global Const $gui_checked = 1
  502. Global Const $gui_indeterminate = 2
  503. Global Const $gui_unchecked = 4
  504. Global Const $gui_dropaccepted = 8
  505. Global Const $gui_nodropaccepted = 4096
  506. Global Const $gui_acceptfiles = $gui_dropaccepted
  507. Global Const $gui_show = 16
  508. Global Const $gui_hide = 32
  509. Global Const $gui_enable = 64
  510. Global Const $gui_disable = 128
  511. Global Const $gui_focus = 256
  512. Global Const $gui_nofocus = 8192
  513. Global Const $gui_defbutton = 512
  514. Global Const $gui_expand = 1024
  515. Global Const $gui_ontop = 2048
  516. Global Const $gui_fontitalic = 2
  517. Global Const $gui_fontunder = 4
  518. Global Const $gui_fontstrike = 8
  519. Global Const $gui_dockauto = 1
  520. Global Const $gui_dockleft = 2
  521. Global Const $gui_dockright = 4
  522. Global Const $gui_dockhcenter = 8
  523. Global Const $gui_docktop = 32
  524. Global Const $gui_dockbottom = 64
  525. Global Const $gui_dockvcenter = 128
  526. Global Const $gui_dockwidth = 256
  527. Global Const $gui_dockheight = 512
  528. Global Const $gui_docksize = 768
  529. Global Const $gui_dockmenubar = 544
  530. Global Const $gui_dockstatebar = 576
  531. Global Const $gui_dockall = 802
  532. Global Const $gui_dockborders = 102
  533. Global Const $gui_gr_close = 1
  534. Global Const $gui_gr_line = 2
  535. Global Const $gui_gr_bezier = 4
  536. Global Const $gui_gr_move = 6
  537. Global Const $gui_gr_color = 8
  538. Global Const $gui_gr_rect = 10
  539. Global Const $gui_gr_ellipse = 12
  540. Global Const $gui_gr_pie = 14
  541. Global Const $gui_gr_dot = 16
  542. Global Const $gui_gr_pixel = 18
  543. Global Const $gui_gr_hint = 20
  544. Global Const $gui_gr_refresh = 22
  545. Global Const $gui_gr_pensize = 24
  546. Global Const $gui_gr_nobkcolor = -2
  547. Global Const $gui_bkcolor_default = -1
  548. Global Const $gui_bkcolor_transparent = -2
  549. Global Const $gui_bkcolor_lv_alternate = -33554432
  550. Global Const $gui_ws_ex_parentdrag = 1048576
  551. Global Const $ss_left = 0
  552. Global Const $ss_center = 1
  553. Global Const $ss_right = 2
  554. Global Const $ss_icon = 3
  555. Global Const $ss_blackrect = 4
  556. Global Const $ss_grayrect = 5
  557. Global Const $ss_whiterect = 6
  558. Global Const $ss_blackframe = 7
  559. Global Const $ss_grayframe = 8
  560. Global Const $ss_whiteframe = 9
  561. Global Const $ss_simple = 11
  562. Global Const $ss_leftnowordwrap = 12
  563. Global Const $ss_bitmap = 14
  564. Global Const $ss_etchedhorz = 16
  565. Global Const $ss_etchedvert = 17
  566. Global Const $ss_etchedframe = 18
  567. Global Const $ss_noprefix = 128
  568. Global Const $ss_notify = 256
  569. Global Const $ss_centerimage = 512
  570. Global Const $ss_rightjust = 1024
  571. Global Const $ss_sunken = 4096
  572. Global Const $gui_ss_default_label = 0
  573. Global Const $gui_ss_default_graphic = 0
  574. Global Const $gui_ss_default_icon = $ss_notify
  575. Global Const $gui_ss_default_pic = $ss_notify
  576. Global Const $ws_tiled = 0
  577. Global Const $ws_overlapped = 0
  578. Global Const $ws_maximizebox = 65536
  579. Global Const $ws_minimizebox = 131072
  580. Global Const $ws_tabstop = 65536
  581. Global Const $ws_group = 131072
  582. Global Const $ws_sizebox = 262144
  583. Global Const $ws_thickframe = 262144
  584. Global Const $ws_sysmenu = 524288
  585. Global Const $ws_hscroll = 1048576
  586. Global Const $ws_vscroll = 2097152
  587. Global Const $ws_dlgframe = 4194304
  588. Global Const $ws_border = 8388608
  589. Global Const $ws_caption = 12582912
  590. Global Const $ws_overlappedwindow = 13565952
  591. Global Const $ws_tiledwindow = 13565952
  592. Global Const $ws_maximize = 16777216
  593. Global Const $ws_clipchildren = 33554432
  594. Global Const $ws_clipsiblings = 67108864
  595. Global Const $ws_disabled = 134217728
  596. Global Const $ws_visible = 268435456
  597. Global Const $ws_minimize = 536870912
  598. Global Const $ws_child = 1073741824
  599. Global Const $ws_popup = -2147483648
  600. Global Const $ws_popupwindow = -2138570752
  601. Global Const $ds_modalframe = 128
  602. Global Const $ds_setforeground = 512
  603. Global Const $ds_contexthelp = 8192
  604. Global Const $ws_ex_acceptfiles = 16
  605. Global Const $ws_ex_mdichild = 64
  606. Global Const $ws_ex_appwindow = 262144
  607. Global Const $ws_ex_composited = 33554432
  608. Global Const $ws_ex_clientedge = 512
  609. Global Const $ws_ex_contexthelp = 1024
  610. Global Const $ws_ex_dlgmodalframe = 1
  611. Global Const $ws_ex_leftscrollbar = 16384
  612. Global Const $ws_ex_overlappedwindow = 768
  613. Global Const $ws_ex_right = 4096
  614. Global Const $ws_ex_staticedge = 131072
  615. Global Const $ws_ex_toolwindow = 128
  616. Global Const $ws_ex_topmost = 8
  617. Global Const $ws_ex_transparent = 32
  618. Global Const $ws_ex_windowedge = 256
  619. Global Const $ws_ex_layered = 524288
  620. Global Const $ws_ex_controlparent = 65536
  621. Global Const $ws_ex_layoutrtl = 4194304
  622. Global Const $ws_ex_rtlreading = 8192
  623. Global Const $wm_gettextlength = 14
  624. Global Const $wm_gettext = 13
  625. Global Const $wm_size = 5
  626. Global Const $wm_sizing = 532
  627. Global Const $wm_user = 1024
  628. Global Const $wm_create = 1
  629. Global Const $wm_destroy = 2
  630. Global Const $wm_move = 3
  631. Global Const $wm_activate = 6
  632. Global Const $wm_setfocus = 7
  633. Global Const $wm_killfocus = 8
  634. Global Const $wm_enable = 10
  635. Global Const $wm_setredraw = 11
  636. Global Const $wm_settext = 12
  637. Global Const $wm_paint = 15
  638. Global Const $wm_close = 16
  639. Global Const $wm_queryendsession = 17
  640. Global Const $wm_quit = 18
  641. Global Const $wm_erasebkgnd = 20
  642. Global Const $wm_queryopen = 19
  643. Global Const $wm_syscolorchange = 21
  644. Global Const $wm_endsession = 22
  645. Global Const $wm_showwindow = 24
  646. Global Const $wm_settingchange = 26
  647. Global Const $wm_wininichange = 26
  648. Global Const $wm_devmodechange = 27
  649. Global Const $wm_activateapp = 28
  650. Global Const $wm_fontchange = 29
  651. Global Const $wm_timechange = 30
  652. Global Const $wm_cancelmode = 31
  653. Global Const $wm_ime_startcomposition = 269
  654. Global Const $wm_ime_endcomposition = 270
  655. Global Const $wm_ime_composition = 271
  656. Global Const $wm_ime_keylast = 271
  657. Global Const $wm_setcursor = 32
  658. Global Const $wm_mouseactivate = 33
  659. Global Const $wm_childactivate = 34
  660. Global Const $wm_queuesync = 35
  661. Global Const $wm_getminmaxinfo = 36
  662. Global Const $wm_painticon = 38
  663. Global Const $wm_iconerasebkgnd = 39
  664. Global Const $wm_nextdlgctl = 40
  665. Global Const $wm_spoolerstatus = 42
  666. Global Const $wm_drawitem = 43
  667. Global Const $wm_measureitem = 44
  668. Global Const $wm_deleteitem = 45
  669. Global Const $wm_vkeytoitem = 46
  670. Global Const $wm_chartoitem = 47
  671. Global Const $wm_setfont = 48
  672. Global Const $wm_getfont = 49
  673. Global Const $wm_sethotkey = 50
  674. Global Const $wm_gethotkey = 51
  675. Global Const $wm_querydragicon = 55
  676. Global Const $wm_compareitem = 57
  677. Global Const $wm_getobject = 61
  678. Global Const $wm_compacting = 65
  679. Global Const $wm_commnotify = 68
  680. Global Const $wm_windowposchanging = 70
  681. Global Const $wm_windowposchanged = 71
  682. Global Const $wm_power = 72
  683. Global Const $wm_notify = 78
  684. Global Const $wm_copydata = 74
  685. Global Const $wm_canceljournal = 75
  686. Global Const $wm_inputlangchangerequest = 80
  687. Global Const $wm_inputlangchange = 81
  688. Global Const $wm_tcard = 82
  689. Global Const $wm_help = 83
  690. Global Const $wm_userchanged = 84
  691. Global Const $wm_notifyformat = 85
  692. Global Const $wm_parentnotify = 528
  693. Global Const $wm_entermenuloop = 529
  694. Global Const $wm_exitmenuloop = 530
  695. Global Const $wm_nextmenu = 531
  696. Global Const $wm_capturechanged = 533
  697. Global Const $wm_moving = 534
  698. Global Const $wm_powerbroadcast = 536
  699. Global Const $wm_devicechange = 537
  700. Global Const $wm_mdicreate = 544
  701. Global Const $wm_mdidestroy = 545
  702. Global Const $wm_mdiactivate = 546
  703. Global Const $wm_mdirestore = 547
  704. Global Const $wm_mdinext = 548
  705. Global Const $wm_mdimaximize = 549
  706. Global Const $wm_mditile = 550
  707. Global Const $wm_mdicascade = 551
  708. Global Const $wm_mdiiconarrange = 552
  709. Global Const $wm_mdigetactive = 553
  710. Global Const $wm_mdisetmenu = 560
  711. Global Const $wm_entersizemove = 561
  712. Global Const $wm_exitsizemove = 562
  713. Global Const $wm_dropfiles = 563
  714. Global Const $wm_mdirefreshmenu = 564
  715. Global Const $wm_ime_setcontext = 641
  716. Global Const $wm_ime_notify = 642
  717. Global Const $wm_ime_control = 643
  718. Global Const $wm_ime_compositionfull = 644
  719. Global Const $wm_ime_select = 645
  720. Global Const $wm_ime_char = 646
  721. Global Const $wm_ime_request = 648
  722. Global Const $wm_ime_keydown = 656
  723. Global Const $wm_ime_keyup = 657
  724. Global Const $wm_ncmousehover = 672
  725. Global Const $wm_mousehover = 673
  726. Global Const $wm_ncmouseleave = 674
  727. Global Const $wm_mouseleave = 675
  728. Global Const $wm_wtssession_change = 689
  729. Global Const $wm_tablet_first = 704
  730. Global Const $wm_tablet_last = 735
  731. Global Const $wm_cut = 768
  732. Global Const $wm_copy = 769
  733. Global Const $wm_paste = 770
  734. Global Const $wm_clear = 771
  735. Global Const $wm_undo = 772
  736. Global Const $wm_paletteischanging = 784
  737. Global Const $wm_hotkey = 786
  738. Global Const $wm_palettechanged = 785
  739. Global Const $wm_print = 791
  740. Global Const $wm_printclient = 792
  741. Global Const $wm_appcommand = 793
  742. Global Const $wm_querynewpalette = 783
  743. Global Const $wm_themechanged = 794
  744. Global Const $wm_handheldfirst = 856
  745. Global Const $wm_handheldlast = 863
  746. Global Const $wm_afxfirst = 864
  747. Global Const $wm_afxlast = 895
  748. Global Const $wm_penwinfirst = 896
  749. Global Const $wm_penwinlast = 911
  750. Global Const $wm_contextmenu = 123
  751. Global Const $wm_stylechanging = 124
  752. Global Const $wm_stylechanged = 125
  753. Global Const $wm_displaychange = 126
  754. Global Const $wm_geticon = 127
  755. Global Const $wm_seticon = 128
  756. Global Const $wm_nccreate = 129
  757. Global Const $wm_ncdestroy = 130
  758. Global Const $wm_nccalcsize = 131
  759. Global Const $wm_nchittest = 132
  760. Global Const $wm_ncpaint = 133
  761. Global Const $wm_ncactivate = 134
  762. Global Const $wm_getdlgcode = 135
  763. Global Const $wm_syncpaint = 136
  764. Global Const $wm_ncmousemove = 160
  765. Global Const $wm_nclbuttondown = 161
  766. Global Const $wm_nclbuttonup = 162
  767. Global Const $wm_nclbuttondblclk = 163
  768. Global Const $wm_ncrbuttondown = 164
  769. Global Const $wm_ncrbuttonup = 165
  770. Global Const $wm_ncrbuttondblclk = 166
  771. Global Const $wm_ncmbuttondown = 167
  772. Global Const $wm_ncmbuttonup = 168
  773. Global Const $wm_ncmbuttondblclk = 169
  774. Global Const $wm_ncxbuttondown = 171
  775. Global Const $wm_ncxbuttonup = 172
  776. Global Const $wm_ncxbuttondblclk = 173
  777. Global Const $wm_keydown = 256
  778. Global Const $wm_keyfirst = 256
  779. Global Const $wm_keyup = 257
  780. Global Const $wm_char = 258
  781. Global Const $wm_deadchar = 259
  782. Global Const $wm_syskeydown = 260
  783. Global Const $wm_syskeyup = 261
  784. Global Const $wm_syschar = 262
  785. Global Const $wm_sysdeadchar = 263
  786. Global Const $wm_keylast = 265
  787. Global Const $wm_unichar = 265
  788. Global Const $wm_initdialog = 272
  789. Global Const $wm_command = 273
  790. Global Const $wm_syscommand = 274
  791. Global Const $wm_timer = 275
  792. Global Const $wm_hscroll = 276
  793. Global Const $wm_vscroll = 277
  794. Global Const $wm_initmenu = 278
  795. Global Const $wm_initmenupopup = 279
  796. Global Const $wm_menuselect = 287
  797. Global Const $wm_menuchar = 288
  798. Global Const $wm_enteridle = 289
  799. Global Const $wm_menurbuttonup = 290
  800. Global Const $wm_menudrag = 291
  801. Global Const $wm_menugetobject = 292
  802. Global Const $wm_uninitmenupopup = 293
  803. Global Const $wm_menucommand = 294
  804. Global Const $wm_changeuistate = 295
  805. Global Const $wm_updateuistate = 296
  806. Global Const $wm_queryuistate = 297
  807. Global Const $wm_ctlcolormsgbox = 306
  808. Global Const $wm_ctlcoloredit = 307
  809. Global Const $wm_ctlcolorlistbox = 308
  810. Global Const $wm_ctlcolorbtn = 309
  811. Global Const $wm_ctlcolordlg = 310
  812. Global Const $wm_ctlcolorscrollbar = 311
  813. Global Const $wm_ctlcolorstatic = 312
  814. Global Const $wm_ctlcolor = 25
  815. Global Const $mn_gethmenu = 481
  816. Global Const $wm_app = 32768
  817. Global Const $nm_first = 0
  818. Global Const $nm_outofmemory = $nm_first - 1
  819. Global Const $nm_click = $nm_first - 2
  820. Global Const $nm_dblclk = $nm_first - 3
  821. Global Const $nm_return = $nm_first - 4
  822. Global Const $nm_rclick = $nm_first - 5
  823. Global Const $nm_rdblclk = $nm_first - 6
  824. Global Const $nm_setfocus = $nm_first - 7
  825. Global Const $nm_killfocus = $nm_first - 8
  826. Global Const $nm_customdraw = $nm_first - 12
  827. Global Const $nm_hover = $nm_first - 13
  828. Global Const $nm_nchittest = $nm_first - 14
  829. Global Const $nm_keydown = $nm_first - 15
  830. Global Const $nm_releasedcapture = $nm_first - 16
  831. Global Const $nm_setcursor = $nm_first - 17
  832. Global Const $nm_char = $nm_first - 18
  833. Global Const $nm_tooltipscreated = $nm_first - 19
  834. Global Const $nm_ldown = $nm_first - 20
  835. Global Const $nm_rdown = $nm_first - 21
  836. Global Const $nm_themechanged = $nm_first - 22
  837. Global Const $wm_mousefirst = 512
  838. Global Const $wm_mousemove = 512
  839. Global Const $wm_lbuttondown = 513
  840. Global Const $wm_lbuttonup = 514
  841. Global Const $wm_lbuttondblclk = 515
  842. Global Const $wm_rbuttondown = 516
  843. Global Const $wm_rbuttonup = 517
  844. Global Const $wm_rbuttondblclk = 518
  845. Global Const $wm_mbuttondown = 519
  846. Global Const $wm_mbuttonup = 520
  847. Global Const $wm_mbuttondblclk = 521
  848. Global Const $wm_mousewheel = 522
  849. Global Const $wm_xbuttondown = 523
  850. Global Const $wm_xbuttonup = 524
  851. Global Const $wm_xbuttondblclk = 525
  852. Global Const $wm_mousehwheel = 526
  853. Global Const $ps_solid = 0
  854. Global Const $ps_dash = 1
  855. Global Const $ps_dot = 2
  856. Global Const $ps_dashdot = 3
  857. Global Const $ps_dashdotdot = 4
  858. Global Const $ps_null = 5
  859. Global Const $ps_insideframe = 6
  860. Global Const $lwa_alpha = 2
  861. Global Const $lwa_colorkey = 1
  862. Global Const $rgn_and = 1
  863. Global Const $rgn_or = 2
  864. Global Const $rgn_xor = 3
  865. Global Const $rgn_diff = 4
  866. Global Const $rgn_copy = 5
  867. Global Const $errorregion = 0
  868. Global Const $nullregion = 1
  869. Global Const $simpleregion = 2
  870. Global Const $complexregion = 3
  871. Global Const $transparent = 1
  872. Global Const $opaque = 2
  873. Global Const $ccm_first = 8192
  874. Global Const $ccm_getunicodeformat = ($ccm_first + 6)
  875. Global Const $ccm_setunicodeformat = ($ccm_first + 5)
  876. Global Const $ccm_setbkcolor = $ccm_first + 1
  877. Global Const $ccm_setcolorscheme = $ccm_first + 2
  878. Global Const $ccm_getcolorscheme = $ccm_first + 3
  879. Global Const $ccm_getdroptarget = $ccm_first + 4
  880. Global Const $ccm_setwindowtheme = $ccm_first + 11
  881. Global Const $ga_parent = 1
  882. Global Const $ga_root = 2
  883. Global Const $ga_rootowner = 3
  884. Global Const $sm_cxscreen = 0
  885. Global Const $sm_cyscreen = 1
  886. Global Const $sm_cxvscroll = 2
  887. Global Const $sm_cyhscroll = 3
  888. Global Const $sm_cycaption = 4
  889. Global Const $sm_cxborder = 5
  890. Global Const $sm_cyborder = 6
  891. Global Const $sm_cxdlgframe = 7
  892. Global Const $sm_cydlgframe = 8
  893. Global Const $sm_cyvthumb = 9
  894. Global Const $sm_cxhthumb = 10
  895. Global Const $sm_cxicon = 11
  896. Global Const $sm_cyicon = 12
  897. Global Const $sm_cxcursor = 13
  898. Global Const $sm_cycursor = 14
  899. Global Const $sm_cymenu = 15
  900. Global Const $sm_cxfullscreen = 16
  901. Global Const $sm_cyfullscreen = 17
  902. Global Const $sm_cykanjiwindow = 18
  903. Global Const $sm_mousepresent = 19
  904. Global Const $sm_cyvscroll = 20
  905. Global Const $sm_cxhscroll = 21
  906. Global Const $sm_debug = 22
  907. Global Const $sm_swapbutton = 23
  908. Global Const $sm_reserved1 = 24
  909. Global Const $sm_reserved2 = 25
  910. Global Const $sm_reserved3 = 26
  911. Global Const $sm_reserved4 = 27
  912. Global Const $sm_cxmin = 28
  913. Global Const $sm_cymin = 29
  914. Global Const $sm_cxsize = 30
  915. Global Const $sm_cysize = 31
  916. Global Const $sm_cxframe = 32
  917. Global Const $sm_cyframe = 33
  918. Global Const $sm_cxmintrack = 34
  919. Global Const $sm_cymintrack = 35
  920. Global Const $sm_cxdoubleclk = 36
  921. Global Const $sm_cydoubleclk = 37
  922. Global Const $sm_cxiconspacing = 38
  923. Global Const $sm_cyiconspacing = 39
  924. Global Const $sm_menudropalignment = 40
  925. Global Const $sm_penwindows = 41
  926. Global Const $sm_dbcsenabled = 42
  927. Global Const $sm_cmousebuttons = 43
  928. Global Const $sm_secure = 44
  929. Global Const $sm_cxedge = 45
  930. Global Const $sm_cyedge = 46
  931. Global Const $sm_cxminspacing = 47
  932. Global Const $sm_cyminspacing = 48
  933. Global Const $sm_cxsmicon = 49
  934. Global Const $sm_cysmicon = 50
  935. Global Const $sm_cysmcaption = 51
  936. Global Const $sm_cxsmsize = 52
  937. Global Const $sm_cysmsize = 53
  938. Global Const $sm_cxmenusize = 54
  939. Global Const $sm_cymenusize = 55
  940. Global Const $sm_arrange = 56
  941. Global Const $sm_cxminimized = 57
  942. Global Const $sm_cyminimized = 58
  943. Global Const $sm_cxmaxtrack = 59
  944. Global Const $sm_cymaxtrack = 60
  945. Global Const $sm_cxmaximized = 61
  946. Global Const $sm_cymaximized = 62
  947. Global Const $sm_network = 63
  948. Global Const $sm_cleanboot = 67
  949. Global Const $sm_cxdrag = 68
  950. Global Const $sm_cydrag = 69
  951. Global Const $sm_showsounds = 70
  952. Global Const $sm_cxmenucheck = 71
  953. Global Const $sm_cymenucheck = 72
  954. Global Const $sm_slowmachine = 73
  955. Global Const $sm_mideastenabled = 74
  956. Global Const $sm_mousewheelpresent = 75
  957. Global Const $sm_xvirtualscreen = 76
  958. Global Const $sm_yvirtualscreen = 77
  959. Global Const $sm_cxvirtualscreen = 78
  960. Global Const $sm_cyvirtualscreen = 79
  961. Global Const $sm_cmonitors = 80
  962. Global Const $sm_samedisplayformat = 81
  963. Global Const $sm_immenabled = 82
  964. Global Const $sm_cxfocusborder = 83
  965. Global Const $sm_cyfocusborder = 84
  966. Global Const $sm_tabletpc = 86
  967. Global Const $sm_mediacenter = 87
  968. Global Const $sm_starter = 88
  969. Global Const $sm_serverr2 = 89
  970. Global Const $sm_cmetrics = 90
  971. Global Const $sm_remotesession = 4096
  972. Global Const $sm_shuttingdown = 8192
  973. Global Const $sm_remotecontrol = 8193
  974. Global Const $sm_caretblinkingenabled = 8194
  975. Global Const $blackness = 66
  976. Global Const $captureblt = 1073741824
  977. Global Const $dstinvert = 5570569
  978. Global Const $mergecopy = 12583114
  979. Global Const $mergepaint = 12255782
  980. Global Const $nomirrorbitmap = -2147483648
  981. Global Const $notsrccopy = 3342344
  982. Global Const $notsrcerase = 1114278
  983. Global Const $patcopy = 15728673
  984. Global Const $patinvert = 5898313
  985. Global Const $patpaint = 16452105
  986. Global Const $srcand = 8913094
  987. Global Const $srccopy = 13369376
  988. Global Const $srcerase = 4457256
  989. Global Const $srcinvert = 6684742
  990. Global Const $srcpaint = 15597702
  991. Global Const $whiteness = 16711778
  992. Global Const $dt_bottom = 8
  993. Global Const $dt_calcrect = 1024
  994. Global Const $dt_center = 1
  995. Global Const $dt_editcontrol = 8192
  996. Global Const $dt_end_ellipsis = 32768
  997. Global Const $dt_expandtabs = 64
  998. Global Const $dt_externalleading = 512
  999. Global Const $dt_hideprefix = 1048576
  1000. Global Const $dt_internal = 4096
  1001. Global Const $dt_left = 0
  1002. Global Const $dt_modifystring = 65536
  1003. Global Const $dt_noclip = 256
  1004. Global Const $dt_nofullwidthcharbreak = 524288
  1005. Global Const $dt_noprefix = 2048
  1006. Global Const $dt_path_ellipsis = 16384
  1007. Global Const $dt_prefixonly = 2097152
  1008. Global Const $dt_right = 2
  1009. Global Const $dt_rtlreading = 131072
  1010. Global Const $dt_singleline = 32
  1011. Global Const $dt_tabstop = 128
  1012. Global Const $dt_top = 0
  1013. Global Const $dt_vcenter = 4
  1014. Global Const $dt_wordbreak = 16
  1015. Global Const $dt_word_ellipsis = 262144
  1016. Global Const $rdw_erase = 4
  1017. Global Const $rdw_frame = 1024
  1018. Global Const $rdw_internalpaint = 2
  1019. Global Const $rdw_invalidate = 1
  1020. Global Const $rdw_noerase = 32
  1021. Global Const $rdw_noframe = 2048
  1022. Global Const $rdw_nointernalpaint = 16
  1023. Global Const $rdw_validate = 8
  1024. Global Const $rdw_erasenow = 512
  1025. Global Const $rdw_updatenow = 256
  1026. Global Const $rdw_allchildren = 128
  1027. Global Const $rdw_nochildren = 64
  1028. Global Const $wm_renderformat = 773
  1029. Global Const $wm_renderallformats = 774
  1030. Global Const $wm_destroyclipboard = 775
  1031. Global Const $wm_drawclipboard = 776
  1032. Global Const $wm_paintclipboard = 777
  1033. Global Const $wm_vscrollclipboard = 778
  1034. Global Const $wm_sizeclipboard = 779
  1035. Global Const $wm_askcbformatname = 780
  1036. Global Const $wm_changecbchain = 781
  1037. Global Const $wm_hscrollclipboard = 782
  1038. Global Const $hterror = -2
  1039. Global Const $httransparent = -1
  1040. Global Const $htnowhere = 0
  1041. Global Const $htclient = 1
  1042. Global Const $htcaption = 2
  1043. Global Const $htsysmenu = 3
  1044. Global Const $htgrowbox = 4
  1045. Global Const $htsize = $htgrowbox
  1046. Global Const $htmenu = 5
  1047. Global Const $hthscroll = 6
  1048. Global Const $htvscroll = 7
  1049. Global Const $htminbutton = 8
  1050. Global Const $htmaxbutton = 9
  1051. Global Const $htleft = 10
  1052. Global Const $htright = 11
  1053. Global Const $httop = 12
  1054. Global Const $httopleft = 13
  1055. Global Const $httopright = 14
  1056. Global Const $htbottom = 15
  1057. Global Const $htbottomleft = 16
  1058. Global Const $htbottomright = 17
  1059. Global Const $htborder = 18
  1060. Global Const $htreduce = $htminbutton
  1061. Global Const $htzoom = $htmaxbutton
  1062. Global Const $htsizefirst = $htleft
  1063. Global Const $htsizelast = $htbottomright
  1064. Global Const $htobject = 19
  1065. Global Const $htclose = 20
  1066. Global Const $hthelp = 21
  1067. Global Const $color_scrollbar = 0
  1068. Global Const $color_background = 1
  1069. Global Const $color_activecaption = 2
  1070. Global Const $color_inactivecaption = 3
  1071. Global Const $color_menu = 4
  1072. Global Const $color_window = 5
  1073. Global Const $color_windowframe = 6
  1074. Global Const $color_menutext = 7
  1075. Global Const $color_windowtext = 8
  1076. Global Const $color_captiontext = 9
  1077. Global Const $color_activeborder = 10
  1078. Global Const $color_inactiveborder = 11
  1079. Global Const $color_appworkspace = 12
  1080. Global Const $color_highlight = 13
  1081. Global Const $color_highlighttext = 14
  1082. Global Const $color_btnface = 15
  1083. Global Const $color_btnshadow = 16
  1084. Global Const $color_graytext = 17
  1085. Global Const $color_btntext = 18
  1086. Global Const $color_inactivecaptiontext = 19
  1087. Global Const $color_btnhighlight = 20
  1088. Global Const $color_3ddkshadow = 21
  1089. Global Const $color_3dlight = 22
  1090. Global Const $color_infotext = 23
  1091. Global Const $color_infobk = 24
  1092. Global Const $color_hotlight = 26
  1093. Global Const $color_gradientactivecaption = 27
  1094. Global Const $color_gradientinactivecaption = 28
  1095. Global Const $color_menuhilight = 29
  1096. Global Const $color_menubar = 30
  1097. Global Const $color_desktop = 1
  1098. Global Const $color_3dface = 15
  1099. Global Const $color_3dshadow = 16
  1100. Global Const $color_3dhighlight = 20
  1101. Global Const $color_3dhilight = 20
  1102. Global Const $color_btnhilight = 20
  1103. Global Const $hinst_commctrl = -1
  1104. Global Const $idb_std_small_color = 0
  1105. Global Const $idb_std_large_color = 1
  1106. Global Const $idb_view_small_color = 4
  1107. Global Const $idb_view_large_color = 5
  1108. Global Const $idb_hist_small_color = 8
  1109. Global Const $idb_hist_large_color = 9
  1110. Global Const $startf_forceofffeedback = 128
  1111. Global Const $startf_forceonfeedback = 64
  1112. Global Const $startf_runfullscreen = 32
  1113. Global Const $startf_usecountchars = 8
  1114. Global Const $startf_usefillattribute = 16
  1115. Global Const $startf_usehotkey = 512
  1116. Global Const $startf_useposition = 4
  1117. Global Const $startf_useshowwindow = 1
  1118. Global Const $startf_usesize = 2
  1119. Global Const $startf_usestdhandles = 256
  1120. Global Const $cdds_prepaint = 1
  1121. Global Const $cdds_postpaint = 2
  1122. Global Const $cdds_preerase = 3
  1123. Global Const $cdds_posterase = 4
  1124. Global Const $cdds_item = 65536
  1125. Global Const $cdds_itemprepaint = 65537
  1126. Global Const $cdds_itempostpaint = 65538
  1127. Global Const $cdds_itempreerase = 65539
  1128. Global Const $cdds_itemposterase = 65540
  1129. Global Const $cdds_subitem = 131072
  1130. Global Const $cdis_selected = 1
  1131. Global Const $cdis_grayed = 2
  1132. Global Const $cdis_disabled = 4
  1133. Global Const $cdis_checked = 8
  1134. Global Const $cdis_focus = 16
  1135. Global Const $cdis_default = 32
  1136. Global Const $cdis_hot = 64
  1137. Global Const $cdis_marked = 128
  1138. Global Const $cdis_indeterminate = 256
  1139. Global Const $cdis_showkeyboardcues = 512
  1140. Global Const $cdis_nearhot = 1024
  1141. Global Const $cdis_othersidehot = 2048
  1142. Global Const $cdis_drophilited = 4096
  1143. Global Const $cdrf_dodefault = 0
  1144. Global Const $cdrf_newfont = 2
  1145. Global Const $cdrf_skipdefault = 4
  1146. Global Const $cdrf_notifypostpaint = 16
  1147. Global Const $cdrf_notifyitemdraw = 32
  1148. Global Const $cdrf_notifysubitemdraw = 32
  1149. Global Const $cdrf_notifyposterase = 64
  1150. Global Const $cdrf_doerase = 8
  1151. Global Const $cdrf_skippostpaint = 256
  1152. Global Const $gui_ss_default_gui = BitOR($ws_minimizebox, $ws_caption, $ws_popup, $ws_sysmenu)
  1153. $randnumber = Random(1000, 9999999, 1)
  1154. Global $input, $output
  1155. Global $inputselected = False
  1156. Global $outpuselected = False
  1157. Global $form1 = GUICreate("Minecraft Font Converter - v1.0", 421, 250, 192, 124)
  1158. Global $input_ttfpath = GUICtrlCreateInput("Please Select a ttf file", 128, 61, 185, 21)
  1159. Global $label1 = GUICtrlCreateLabel("Font File .TTF", 24, 64, 101, 20)
  1160. GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
  1161. Global $label2 = GUICtrlCreateLabel("Minecraft Font Converter", 64, 8, 291, 33)
  1162. GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif")
  1163. Global $bt_fileselect = GUICtrlCreateButton("Browse", 320, 59, 75, 25)
  1164. Global $input_output = GUICtrlCreateInput("Please Select the ouput folder", 128, 86, 185, 21)
  1165. Global $label3 = GUICtrlCreateLabel("Output", 24, 88, 48, 20)
  1166. GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
  1167. Global $bt_ouputselect = GUICtrlCreateButton("Browse", 320, 85, 75, 25)
  1168. Global $label4 = GUICtrlCreateLabel("Resolution (32 Recommanded)", 24, 120, 287, 20)
  1169. GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
  1170. Global $labelfontsize = GUICtrlCreateLabel("Font Size", 24, 144, 287, 20)
  1171. GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
  1172. Global $labelxoffset = GUICtrlCreateLabel("x Offset", 24, 168, 287, 20)
  1173. GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
  1174. Global $labelyoffset = GUICtrlCreateLabel("y Offset", 24, 192, 287, 20)
  1175. GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
  1176. Global $updown_resolution = GUICtrlCreateInput("32", 320, 120, 57, 21)
  1177. GUICtrlCreateUpdown(-1)
  1178. Global $updown_fontsize = GUICtrlCreateInput("28", 320, 144, 57, 21)
  1179. GUICtrlCreateUpdown(-1)
  1180. Global $updown_xoffset = GUICtrlCreateInput("5.6", 320, 168, 57, 21)
  1181. GUICtrlCreateUpdown(-1)
  1182. Global $updown_yoffset = GUICtrlCreateInput("5.6", 320, 192, 57, 21)
  1183. GUICtrlCreateUpdown(-1)
  1184. Global $bt_convert = GUICtrlCreateButton("Convert", 336, 216, 75, 25)
  1185. Global $label8 = GUICtrlCreateLabel("Thanks to Jamesst20 and Xpansive", 8, 232, 205, 17)
  1186. GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
  1187. checkrecommandedsize()
  1188. GUISetState(@SW_SHOW)
  1189. AdlibRegister("CheckRecommandedSize", 500)
  1190. While 1
  1191. $nmsg = GUIGetMsg()
  1192. Switch $nmsg
  1193. Case $gui_event_close
  1194. deletefiles()
  1195. Exit
  1196. Case $bt_fileselect
  1197. $input = FileOpenDialog("Please select a fon t file (.TTF)", @DesktopDir, "Font (*.ttf)", 1)
  1198. If NOT @error Then
  1199. GUICtrlSetData($input_ttfpath, $input)
  1200. $inputselected = True
  1201. EndIf
  1202. Case $bt_ouputselect
  1203. $output = FileSelectFolder("Please select a folder to save the converted font", @DesktopDir, 1)
  1204. If NOT @error Then
  1205. GUICtrlSetData($input_output, $output)
  1206. $outpuselected = True
  1207. EndIf
  1208. Case $bt_convert
  1209. convert()
  1210. EndSwitch
  1211. WEnd
  1212.  
  1213. Func convert()
  1214. 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
  1215. copyandextractfiles()
  1216. RunWait(@TempDir & "/" & $randnumber & "/minefont.exe " & '"' & $input & '"' & " " & GUICtrlRead($updown_resolution) & " " & GUICtrlRead($updown_fontsize) & " " & GUICtrlRead($updown_xoffset) & " " & GUICtrlRead($updown_yoffset), $output, @SW_HIDE)
  1217. deletefiles()
  1218. MsgBox(0, "Done", $output & "\default.png has been created to your desktop. Put this png in a texture pack .zip in font folder.")
  1219. Else
  1220. MsgBox(0, "Something is wrong", "You must fill in all fields")
  1221. EndIf
  1222. EndFunc
  1223.  
  1224. Func copyandextractfiles()
  1225. FileInstall("Ressource.zip", @TempDir & "/" & $randnumber & ".zip")
  1226. _7zipextract(0, @TempDir & "/" & $randnumber & ".zip", @TempDir & "/" & $randnumber & "/", 1)
  1227. EndFunc
  1228.  
  1229. Func deletefiles()
  1230. DirRemove(@TempDir & "\" & $randnumber, 1)
  1231. FileDelete(@TempDir & "\" & $randnumber & ".zip")
  1232. EndFunc
  1233.  
  1234. Func checkrecommandedsize()
  1235. $res = GUICtrlRead($updown_resolution)
  1236. $fontsize = Round($res * 0.875, 1)
  1237. $offset = Round(($res * 0.875 / 5), 2)
  1238. GUICtrlSetData($labelfontsize, "Font Size (Recommanded " & $fontsize & ")")
  1239. GUICtrlSetData($labelxoffset, "x Offset (Recommanded " & $offset & ")")
  1240. GUICtrlSetData($labelyoffset, "y Offset (Recommanded " & $offset & ")")
  1241. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement