;__________________________________________________________________________________________________ ; Check if file exists Func CheckFile ($File) If not FileExists($File) then abort("File does not exist: " & $File) EndFunc ;__________________________________________________________________________________________________ ; Shows Message Box with buttons OK and Cancel Func OK_Cancel ($Text) Local $OK_Cancel =MsgBox(1, @ScriptName, $Text) If $OK_Cancel = 2 Then Terminate() Return EndFunc ;__________________________________________________________________________________________________ ; Shows Message Box with buttons YES and NO Func Yes_No ($Text) Local $yes_no = MsgBox(4, @ScriptName, $Text) If $yes_no = 6 Then return("yes") else return("no") EndIf EndFunc ;__________________________________________________________________________________________________ ; Terminate / user abort / Exit 1 Func Terminate () MsgBox(30, "Terminate - " & @ScriptName, "User abort. Script will terminate.") Exit 1 EndFunc ;__________________________________________________________________________________________________ ; error: Message Box / Exit 1 Func abort($Info) MsgBox(16, "ERROR - " & @ScriptName, $Info & @CRLF & @CRLF & "Exit.") Exit 1 EndFunc ;__________________________________________________________________________________________________