cjmbbbbb 发表于 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不运行,两个分开的时候正常......
难道只能做成两个文件,然后读取运行???

cjmbbbbb 发表于 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

目前这么解决..........
页: [1]
查看完整版本: 托盘图标后再+循环,失败