无忧启动论坛
标题:
求助,退出QQ的同时在把《运行程序集》窗口显示出来
[打印本页]
作者:
2011ziyouren
时间:
2013-12-21 15:37
标题:
求助,退出QQ的同时在把《运行程序集》窗口显示出来
本帖最后由 2011ziyouren 于 2013-12-21 21:24 编辑
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("运行程序集", 502, 238, 244, 143)
$Button1 = GUICtrlCreateButton("运行QQ", 56, 104, 105, 41)
$Button2 = GUICtrlCreateButton("运行迅雷", 196, 102, 105, 41)
$Button3 = GUICtrlCreateButton("运行酷狗", 336, 104, 105, 41)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Run(@ScriptDir & "\QQ.exe")
WinSetState("运行程序集","运行QQ",@SW_HIDE)
Case $Form1
EndSwitch
WEnd
00.jpg
(57.55 KB, 下载次数: 60)
下载附件
2013-12-21 15:37 上传
作者:
tt911
时间:
2013-12-21 16:42
替玩au3的高手顶一顶吧。
作者:
2011ziyouren
时间:
2013-12-21 21:22
AUTOIT中文论坛的afan版主帮我解答了,以后看来没人敢在无忧发贴求助了……
GUICreate('运行程序集', 502, 238)
$Button1 = GUICtrlCreateButton('运行QQ', 56, 104, 105, 41)
$Button2 = GUICtrlCreateButton('运行迅雷', 196, 102, 105, 41)
$Button3 = GUICtrlCreateButton('运行酷狗', 336, 104, 105, 41)
GUISetState()
Local $Pid, $ExeFlag
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $Button1
$Pid = _RunMyExe(@ScriptDir & '\QQ.exe')
Case $Button2
$Pid = _RunMyExe('Thunder.exe 实际路径')
Case $Button3
$Pid = _RunMyExe('KuGou.exe 实际路径')
EndSwitch
If $ExeFlag And Not ProcessExists($Pid) Then
GUISetState()
$ExeFlag = 0
EndIf
WEnd
Func _RunMyExe($Exe)
Local $Pid = Run($Exe)
If Not $Pid Then Return MsgBox(48, '', $Exe & ' 运行失败,请确认路径')
GUISetState(@SW_HIDE)
$ExeFlag = 1
Return $Pid
EndFunc ;==>_RunMyExe
欢迎光临 无忧启动论坛 (http://bbs.wuyou.net/)
Powered by Discuz! X3.3