最后用个笨方法!#include <WindowsConstants.au3>
HotKeySet('{Esc}', '_Exit')
AdlibRegister('Memory', 3000)
$title = "XX的空间 [http://83******.qzone.qq.com] - Windows Internet Explorer"
If WinExists($title) Then
If Not WinActive($title) Then WinActivate($title)
Else
MsgBox(0, "提示", "QQ空间没有打开", 3)
EndIf
WinWaitActive($title)
While 1
Delly()
Sleep(20)
WEnd
Func Delly()
Sleep(500)
MouseClick("left",280,472,1)
Sleep(500)
MouseClick("left",354,468,1)
Sleep(500)
MouseClick("left",791,646,1)
EndFunc
Func _Exit()
Exit
EndFunc
Func Memory()
_ReduceMemory(@AutoItPID)
EndFunc ;==>Memory
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 ;==>_ReduceMemory
|