关于托盘图标闪动?
用TrayTip,能否使托盘图标像QQ来信息一样闪动,谢谢! 可以。TraySetState 搞这个东西要多进程呀。同时要事件模式。难难难。
TraySetState()
While *********
TraySetIcon("Flash.dll", 1)
sleep(200)
TraySetIcon("Flash.dll", 2)
Wend
Do
Opt("TrayIconHide", 1)
sleep(200)
Opt("TrayIconHide", 0)
Until ********
原帖由 liongodmien 于 2008-9-26 22:07 发表 http://www.autoitx.com/images/common/back.gif
TraySetState()
While *********
TraySetIcon("Flash.dll", 1)
sleep(200)
TraySetIcon("Flash.dll", 2)
Wend
Do
Opt("TrayIconHide", 1)
sleep(200)
Opt("TrayI ...
表达式错误. 原帖由 lxz 于 2008-9-26 22:57 发表 http://www.autoitx.com/images/common/back.gif
表达式错误.
噢,买噶,我只是给个样式啊,今天再给个全的!
#NoTrayIcon
Opt("TrayMenuMode", 1)
Opt("trayOnEventMode", 1)
$Test = TrayCreateItem("测试")
TrayItemSetOnEvent($Test, "_TrayMsg")
TrayCreateItem("") ;
$Quit = TrayCreateItem("退出")
TrayItemSetOnEvent($Quit, "_TrayMsg")
TraySetState(@SW_SHOW)
While 1
Sleep(5000)
WEnd
Func _TrayMsg()
Switch @TRAY_ID
Case $Test
MsgBox(48, "提示", "你点下了“测试”")
Case $Quit
Exit
EndSwitch
EndFunc
再来多个可以控制停止闪动的
#NoTrayIcon
Opt("TrayMenuMode", 1)
Opt("trayOnEventMode", 1)
$Flash = TrayCreateItem("闪动开始")
TrayItemSetOnEvent($Flash, "_TrayMsg")
TrayCreateItem("")
$Stop = TrayCreateItem("闪动停止")
TrayItemSetOnEvent($Stop, "_TrayMsg")
TrayCreateItem("")
$Quit = TrayCreateItem("退出")
TrayItemSetOnEvent($Quit, "_TrayMsg")
TraySetState()
While 1
Sleep(5000)
WEnd
Func _TrayMsg()
Switch @TRAY_ID
Case $Flash
MsgBox(48, "提示", "你点下了“闪动开始”")
TraySetState(@SW_SHOW)
Case $Stop
MsgBox(48, "提示", "你点下了“闪动停止”")
TraySetState(@SW_RESTORE)
Case $Quit
Exit
EndSwitch
EndFunc
这样足够了吧?
页:
[1]