home *** CD-ROM | disk | FTP | other *** search
- Hello,
-
- Here is a sample CanDo Deck to demonstrate the use of the command IfError
- to detect an End-of-File.
- To help you understand how it works, I'll explain its basic function.
- When you run the deck, you must press a Button to continue. A file
- requester will appear asking for the name of the a text file to view. The
- Script checks if the file exists, and that it is of unknown type, which
- I assume is an ASCII text file. If the file exists, it is opened and
- the script goes to the card named OpenIt. OpenIt contains a Document Object
- which is used to display each line of the selected file. OpenIt uses a
- reoccurring Timer Object which contains a script to read in a line of text
- from the file and checks for the end of the file. If it is not an end of
- file, the line is typed into the Document being displayed. Each time the
- Timer occurs, this script repeats.
- This example is an unbound Deck. If you own CanDo, use DeckRunner to
- run the Deck. If you do not own CanDo, use DeckBrowser.
- The scripts in this Deck are commented, so feel free to study them from
- within CanDo.
-
- Jim Nelson
- Tech. Support, INOVAtronics.
-