fileloop (fName in folderPath)
if file.isLocked (fName)
lockedFileFound = true
break
++numberOfFiles
if lockedFileFound
msg ("Found a locked file.")
This is just a script fragment, so don't attempt to execute it. A loop like the one above might be used to count the number of files in a folder about to be deleted, so that a confirmation dialog could be presented to the user. However, since a locked
file was found, the folder cannot be deleted, and the loop is terminated early.
loop
if not dialog.ask ("What number am I thinking of?", @x)
return (false)
if x == 16396
break
msg ("Try again!")
This is just a script fragment, so don't attempt to execute it. This loop prompts the user for a number forever, until he or she exhibits astonishing clairvoyance or gets sick of the game. The break statement allows the loop to be terminated if the user
gets lucky.