#include <GDIPlus.au3>
;宋体"福"字笔顺库
$sHzBs = "0:(144,24) (204,96) (216,120) (228,174)#1:(30,204) (276,204) (312,180) (276,204) (222,282) (174,342) (132,390) (90,438) (42,486) (6,522)#2:(180,336) (180,762)#3:(192,342) (246,384) (276,414) (306,450)#4:(318,102) (744,102) (696,84) (648,102)#5:(402,162) (402,360)#6:(402,192) (648,192) (672,168) (648,192) (648,360)#7:(648,324) (402,324)#8:(336,390) (336,750)#9:(336,426) (702,426) (726,408) (702,426) (702,744)#10:(702,558) (336,558)#11:(522,702) (522,426)#12:(336,702) (702,702)"
$hGUI = GUICreate("汉字笔顺演示", @DesktopWidth, @DesktopHeight, 0, 0, 0x80000000);$WS_POPUP = 0x80000000
GUISetState()
_GDIPlus_Startup()
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)
_DrawHzBs($sHzBs, $hGraphic)
_GDIPlus_GraphicsDispose ($hGraphic)
_GDIPlus_Shutdown ()
Func _DrawHzBs($sHzBs, $hGraphic)
Local $aBs = StringSplit($sHzBs, '#', 2);每一个笔画
Local $aXy1, $aXy2, $aCoordinate
For $i=0 To UBound($aBs)-1
$aCoordinate = StringRegExp($aBs[$i], "\((\d+,\d+)\)", 3);x,y坐标
For $j = 0 To UBound($aCoordinate)-2
$aXy1 = StringSplit($aCoordinate[$j],",",2)
$aXy2 = StringSplit($aCoordinate[$j+1],",",2)
;MouseMove($aXy[0],$aXy[1])
_GDIPlus_GraphicsDrawLine ($hGraphic, $aXy1[0], $aXy1[1], $aXy2[0], $aXy2[1])
Sleep(100);笔划走势延时,演示用
Next
Sleep(500);每一个笔划之间延时,演示用
Next
EndFunc