回复 1# ycy Global $work, $tip
For $Mun = 1 To 2 Step 1
$tip = '当前为第' & $Mun & '次循环'
Tip()
_Msg(@error)
Sleep(2000)
finish()
_Msg(@error)
Sleep(2000)
;...
ToolTip(@CR & $tip & @CR, @DesktopWidth - 350, @DesktopHeight - 120, "正在执行: 第(" & $Mun & "/8)项 ", 1)
Next
Func Tip()
$work = 1
EndFunc
Func finish()
$work = 2
Return SetError(1, 0, $work)
EndFunc
Func _Msg($eCoce)
If $eCoce Then
ToolTip(@CR & $tip & @CR, @DesktopWidth - 350, @DesktopHeight - 120, "执行第 " & $work & " 个函数出错了.", 1)
Else
ToolTip(@CR & $tip & @CR, @DesktopWidth - 350, @DesktopHeight - 120, "执行第 " & $work & "个函数成功. ", 1)
EndIf
EndFunc
|