I'd like to start a thread comprised of small useful methods or code samples. I think a lot of us take for granted that the newer users know how to code the simpler things.
Here's my first contribution, a simple while loop that checks for a disk in the A: drive.
This is basic code, you could set return values or do any number of things, but this should get you started.
Mac
Here's my first contribution, a simple while loop that checks for a disk in the A: drive.
Code:
var
userRetry string
endvar
setmouseShape(MouseWait)
While not isDir("A:\\")
userRetry = msgRetryCancel("Drive A:","There is no disk in Drive A:\n Insert a blank one and press Retry")
if UserRetry = "Cancel"
then setmouseShape(MouseArrow)
return ; and additional error processing
endif
endwhile
; any additional processing, like file copying, goes here
setmouseShape(MouseArrow)
This is basic code, you could set return values or do any number of things, but this should get you started.
Mac