本帖最后由 mshuking 于 2016-7-17 23:13 编辑
回复 2# alwaystick
这样对么#Region ;**** 参数创建于 ACNWrapper_GUI ****
#PRE_icon=C:\Windows\SYSTEM32\SHELL32.dll|-15
#PRE_UseX64=n
#PRE_Res_requestedExecutionLevel=None
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <Misc.au3>
#include <Constants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$version = @ScriptName
;If WinExists($version) Then
If _Singleton($version,1)=0 Then
WinSetState("Form1","",@SW_RESTORE)
Exit
EndIf
AutoItWinSetTitle($version)
$Form1 = GUICreate("Form1", 623, 442, 192, 124)
GUISetState(@SW_SHOW)
Opt("TrayIconHide", 1)
Opt("TrayMenuMode",1)
Opt("TrayOnEventMode",1)
TraySetOnEvent($TRAY_EVENT_PRIMARYUP,"tray")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_EVENT_MINIMIZE
GUISetState(@SW_HIDE, $Form1)
Opt("TrayIconHide", 0)
EndSwitch
WEnd
Func tray()
Opt("TrayIconHide", 1)
GUISetState(@SW_SHOW, $Form1)
WinActivate($Form1)
EndFunc
|