新问题,以下代码CPU占用100分100如何解决,这回绝对不是AU3版本的问题了!
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=图标项1_1.ico
#AutoIt3Wrapper_outfile=软件说明必看.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Res_Comment=就要当网管 www.91dwg.com 说明文件
#AutoIt3Wrapper_Res_Description=就要当网管 www.91dwg.com 说明文件
#AutoIt3Wrapper_Res_LegalCopyright=就要当网管 www.91dwg.com 说明文件
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#Region ;**** 参数创建于 AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseAnsi=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include "resources.au3"
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIConstants.au3>
#include <IE.au3>
#include <WindowsConstants.au3>
#notrayicon
$oIE = _IECreateEmbedded ()
$GUI = GUICreate("说明必看 就要当网管 www.91dwg.com", 640, 480, 76, 40)
$GUIX = GUICtrlCreateObj($oIE, 10, 68, 0, 0)
$iEdit = GUICtrlCreateEdit("test", 5, 5, 390, 290, bitOR($WS_VSCROLL, $ES_WANTRETURN))
$hC = DllCallbackRegister("_EditProc", "int", "hWnd;uint;wparam;lparam")
$hOEC = _WinAPI_SetWindowLong(GUICtrlGetHandle($iEdit), -4, DllCallbackGetPtr($hC))
Opt("GUIOnEventMode", 1)
GUISetOnEvent($GUI_EVENT_CLOSE, "Event") ;关闭
GUISetState(@SW_SHOW)
Do
Until GUIGetMsg() = -3
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
Func _EditProc($hWnd, $iMsg, $iwParam, $ilParam)
If $iMsg = $WM_COPY Then Return 1
Return _WinAPI_CallWindowProc($hOEC, $hWnd, $iMsg, $iwParam, $ilParam)
EndFunc ;==>_EditProc
Func Event()
Switch @GUI_CtrlId
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
EndFunc
While 1
Sleep(10)
_ReduceMemory(@AutoItPID)
WEnd |