base:CheckAPPDIR()
Posted: Wed Apr 15, 2015 11:14 pm
This is used to check the presence of an application inside APPDIR - this is only aimed at AmigaOS 4.
If 'warn' is set to True and the application has not been found the user is warned by a dialog box - see separate thread for the base:SystemRequest() function.
If 'appquit' is set to True the application will quit if the application has not been found.
If 'warn' is set to True and the application has not been found the user is warned by a dialog box - see separate thread for the base:SystemRequest() function.
If 'appquit' is set to True the application will quit if the application has not been found.
Code: Select all
Global base, applet_locale
base = {}
DimStr applet_locale[1]
applet_locale[3] = "Cannot find"
applet_locale[8] = "OK"
applet_locale[10] = "Required Application missing"
Function base:CheckAPPDIR(app$,warn,appquit)
If Exists("APPDIR:" .. app$) = True
Return ("APPDIR:" .. app$,True)
Else
If warn = True
base:SystemRequest(applet_locale[10],applet_locale[3] .. " " .. "APPDIR:" .. app$,applet_locale[8],#REQICON_WARNING)
EndIf
If appquit = True
End()
Else
Return (False, False)
EndIf
EndIf
EndFunction