本帖最后由 shenrenba 于 2010-9-21 21:43 编辑
帮忙修改下 问题1:滚动不自然 问题2:如何获取字符占的总长度(不是字符的长度,比如像窗体的宽度100这样的数字)
要是能有其他精简的更好
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Global $y = 500
#Region ### START Koda GUI section ### Form=
GUICreate("测试", 500, 20, -1, 20, $WS_VISIBLE + $WS_POPUP, $WS_EX_TOOLWINDOW)
WinSetOnTop("测试", "", 1)
WinSetTrans("测试", "", 170)
$Label1 = GUICtrlCreateLabel("只是测试,即将开始", 0, 0, 500, 20)
GUICtrlSetColor(-1, 0xff0000)
GUISetState()
#EndRegion ### END Koda GUI section ###
AdlibRegister("gd", 300)
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
Func gd()
Global $a
Local $sData = InetRead('http://www.verycd.com/statics/title.saying')
Local $sR = StringRegExp(BinaryToString($sData, 4), "'(.+?)\'", 3)
For $a = 0 To UBound($sR) - 2
$y = $y - 3
GUICtrlSetPos($Label1, $y, 0)
If $y < -200 Then
$y = 500
GUICtrlSetData($Label1, $sR[$a])
EndIf
Next
EndFunc ;==>gd
|