Func Trayin() ;托盘图标过程
Local $prefsitem,$aboutitem,$exititem,$msg,$openCY,$RamClean,$openExcel
$openCY = TrayCreateItem("自动登录")
$openExcel =TrayCreateItem("打开Microsoft Excel")
TrayCreateItem("")
$RamClean = TrayCreateItem("整理内存")
$prefsitem = TrayCreateItem("参数设置")
TrayCreateItem("")
$aboutitem = TrayCreateItem("关于(&A)")
TrayCreateItem("")
$exititem = TrayCreateItem("退出(&E)辅助工具")
TraySetState()
TraySetToolTip( "辅助工具")
$T = TimerInit()
While 1
$msg = TrayGetMsg()
Select
Case $msg = $openCY
Call("Autologin")
Case $msg= $openExcel
Call("OpenExcel")
Case $msg=$RamClean
Call("Clean")
Case $msg = $prefsitem
Call("config")
Case $msg = $aboutitem
Msgbox(64, "关于:辅助工具", "本工具运行于" & "OS:" & @OSVersion)
Case $msg = $exititem
Exit
EndSelect
If TimerDiff($T) >= 180000 Then
Clean()
$T = TimerInit()
EndIf
WEnd
EndFunc
|