如何使用AU3实现这个功能
本帖最后由 TheBelief 于 2009-7-1 13:02 编辑如题!我查了很多代码都没办法实现,高手出来吧!ToolTip太难看了 下来帮你研究下 2# nboss888
谢谢你 在线等你的消息 本帖最后由 lynfr8 于 2009-7-1 14:13 编辑
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Array.au3>
$gonggao=GUICreate("gonggao",@DesktopWidth,@DesktopHeight/20,"","",0x80000000)
$Label=GUICtrlCreateLabel("",-1,-1,@DesktopWidth,@DesktopHeight/20)
GUISetBkColor(0xE0FFFF)
WinSetTrans("gonggao", "", 180);
GUICtrlSetColor(-1, 0xFF0000)
WinSetOnTop("gonggao", "", 1);
GUISetState(@SW_SHOW)
$sNew ="此处狼群经常出入,敬请注意人身安全! 此乃lynfr8所写的公告动态显示! "
Local $s, $a= StringSplit($sNew, ""), $i
While 1
For $i = $a To 1 Step - 1
Sleep(200)
$s = $a[$i]&$s
GUICtrlSetData($Label,$s)
$font = "Comic Sans MS"
GUICtrlSetFont(-1, 22, 400, 2, $font)
_ReduceMemory(@AutoItPID);释放内存
Next
WEnd
Func _ReduceMemory($i_PID = -1);内存释放函数
If $i_PID <> -1 Then
Local $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess','int', 0x1f0fff, 'int', False, 'int', $i_PID)
Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet','long', $ai_Handle)
DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $ai_Handle)
Else
Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet','long', -1)
EndIf
Return $ai_Return
EndFunc
页:
[1]