How can I set the path to the location for graphics either for drive c or drive d that it runs when the graphic is located on one of the two drives ?
(e.g. ICON "?:\System\Apps\Calculator\calc.mbm"😉
How can I set the path to the location for graphics either for drive c or drive d that it runs when the graphic is located on one of the two drives ?
(e.g. ICON "?:\System\Apps\Calculator\calc.mbm"😉
This is how I do it...
CONST KAppNameShort$="Core"
GLOBAL Path$(255),Drive$(2),Data$(255),MbmFile$(16)
...
MbmFile$=KAppNameShort$+".mbm" : Data$="\System\Apps\"+KAppNameShort$
Foo%=ASC("y"😉
DO
Drive$=UPPER$(CHR$(Foo%))
IF EXIST(Drive$+":"+Data$+MbmFile$)
Path$=Drive$+":"+Data$
BREAK
ENDIF
Foo%=Foo%-1
UNTIL CHR$(Foo%)="Y"
IF Path$=""
ALERT ("Support mbm file not found","Please re-install "+KAppName$)
STOP
ENDIF
And then you know that your graphics are on the drive in Drive$