In the first PROC we start to fill in the variables we created in the last section:
the command CMD$() is very useful then:
It's probably best to store this last part too in a (1 char string) variable...
The CMD$(1) command returns the complete path of your Apps filename.
Consequently the first(or leftmost) letter is the diskletter(usually C or D, but DO NOT ASSUME! New machines might have more... )
The CMD$(2) command returns the name that the system tells your App to open or create.
- CMD$(3) command tells you something about how it was started, and what to do:
- 'C' The App was started from the 'new file' dialog in the System screen.
Create the file mentioned in Runfile$.
- 'O' The App was started by clicking on a associated file.
Since the file exists: Open it!
- 'R' The App was started from either the Extras bar or from the Program editor.
If you have a .ini file check that for a last filename used.(later chapter).
If not, use the supplied filename in Runfile$. If the file exist: Open it else create it.
What we get then is:
That's all there is to collect the information the System sends your App when it's started.
(Boy, this is easy...)
If you're a total.... you don't have to store the last part, but just test for it...