找回密码
 加入
搜索
查看: 1186|回复: 1

托盘图标后再+循环,失败

[复制链接]
发表于 2009-6-19 11:38:02 | 显示全部楼层 |阅读模式
本帖最后由 cjmbbbbb 于 2009-6-19 11:50 编辑

#NoTrayIcon
#Include <Constants.au3>

Opt("TrayMenuMode",1)        ; Default tray menu items (Script Paused/Exit) will not be shown.

$aboutitem                = TrayCreateItem("关于")
TrayCreateItem("")
$exititem                = TrayCreateItem("退出")

TraySetState()

While 1
        If WinExists("请输入资料") And ProcessExists("aup.exe") = 0 Then
                RunWait(@ScriptDir&"\aup.exe")
        EndIf
        $msg = TrayGetMsg()
        Select
                Case $msg = $aboutitem
                        Msgbox(64,"关于:","你刷,我填!")
                Case $msg = $exititem
                        ExitLoop
        EndSelect
WEnd
Exit

如上,托盘出来了,按键没用,WinExists不运行,两个分开的时候正常......
难道只能做成两个文件,然后读取运行???
 楼主| 发表于 2009-6-19 12:01:18 | 显示全部楼层
#NoTrayIcon
#Include <Constants.au3>

Opt("TrayMenuMode", 1)        ; Default tray menu items (Script Paused/Exit) will not be shown.

$aboutitem = TrayCreateItem("关于")
TrayCreateItem("")
$exititem = TrayCreateItem("退出")

TraySetState()

Run(@ScriptDir & "\one.exe")

While 1
        $msg = TrayGetMsg()
        Select
                Case $msg = $aboutitem
                        MsgBox(64, "关于:", "你刷,我填!")
                Case $msg = $exititem
                        ProcessClose("one.exe")
                        ExitLoop
        EndSelect
WEnd
Exit

目前这么解决..........
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-23 01:29 , Processed in 0.068958 second(s), 22 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表