本帖最后由 xunyar 于 2011-5-6 17:22 编辑
如下是我在本站上看到的代码,可是点击关闭时,关闭不了,双击托盘也恢复了界面。那位高手可以修正一下?#include<ie.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <Constants.au3>
#include <ButtonConstants.au3>
#include <SliderConstants.au3>
#NoTrayIcon
Opt("TrayMenuMode",1) ; 默认菜单项目 (脚本暂停中/退出)(Script Paused/Exit) 将不会显示.
$exititem = TrayCreateItem("退出")
TraySetState()
TraySetClick(16)
Opt("GUIOnEventMode",1) ;增
$oIE = _IECreateEmbedded ()
GUICreate(" autoit3",800,600, -1,-1 , 0x04000000 + 0x00CF0000)
GUISetOnEvent($GUI_EVENT_MINIMIZE,"_XIAO") ;增
$GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 800, 620)
GUICtrlSetResizing($GUIActiveX , $GUI_DOCKAUTO);最大化自动调整
GUISetState()
_IENavigate ($oIE, "www.autoitx.com/")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func _XIAO() ;增
GUISetState(@SW_HIDE)
EndFunc
|