本帖最后由 afan 于 2009-10-4 01:30 编辑
找了个 SHAppBarMessage.au3。。。是不是这个意思:#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <SHAppBarMessage.au3>
#NoTrayIcon
FileDelete(@TempDir & "\Idcheck.ini")
$Form1 = GUICreate("Form1", 320, 220, -1, -1, BitOR($WS_POPUP, $WS_CLIPSIBLINGS), $WS_EX_TOOLWINDOW, WinGetHandle(AutoItWinGetTitle()))
$Pic1 = GUICtrlCreatePic("F:\新建文件夹\20090404_dfcd1ae67db3390faa5dyaeq3zXPqpN0.jpg", 0, 0, 320, 220, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$Label1 = GUICtrlCreateLabel("检查程序更新……", 8, 192, 300, 17)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor(-1, 0x800000)
GUISetState()
$begin = TimerInit()
Dim $check, $time = 5
Nchickid()
While 1
$dif = TimerDiff($begin)
If $dif > 14400000 Then
$begin = TimerInit()
Nchickid()
EndIf
$msg = GUIGetMsg(1)
Select
Case $msg[0] = $Pic1
EndSelect
WEnd
Func Nchickid()
$check = chickid()
If $check = "true" Then
Runeyoo()
ElseIf $check = "noid" Then
MsgBox(0, "", "未注册")
ElseIf $check = "false" Then
AdlibEnable("time", 1000)
EndIf
EndFunc ;==>Nchickid
Func Time();倒计时执行语句
If $time < 0 Then
$time = 5
GUICtrlSetData($Label1, "检查程序更新……")
If chickid() = "true" Then
GUICtrlSetData($Label1, "验证通过,启动程序 ")
Runeyoo()
AdlibDisable()
EndIf
EndIf
GUICtrlSetData($Label1, "连接失败" & $time & "秒后重试..")
$time -= 1
EndFunc ;==>Time
Func chickid()
$userid = IniRead(@ScriptDir & "\Config\menuchk.ini", "menuchk", "serviceid", "11")
$GetIdcheck = InetGet("http://127.0.0.1/api.asp?id=" & $userid, @TempDir & "\Idcheck.ini", 1, 0)
If $GetIdcheck = "1" Then
$loadidcheck = FileReadLine(@TempDir & "\Idcheck.ini", 1)
If $loadidcheck = "NoThisID" Then
Return ("noid")
Exit
Else
Return ("true")
EndIf
EndIf
If @error Then
Return ("false")
EndIf
EndFunc ;==>chickid
Func runeyoo()
ShellExecute(@ScriptDir & "\manager.exe")
;GUICtrlSetState($Form1, @SW_HIDE)
;Sleep(600000)
;RegDelete
;Exit
EndFunc ;==>runeyoo
|