#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[0] 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[0])
DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $ai_Handle[0])
Else
Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet','long', -1)
EndIf
Return $ai_Return[0]
EndFunc