home *** CD-ROM | disk | FTP | other *** search
- ; Title : TMDEV.TSK Last Updated : August 21, 1991
- ; Author : Steve Johnson - FmP. Version : 1.30
- ; Purpose : A Task development harness.
- ; Notes : Uses SAVE and RESTORE to file called TMDEV.TM
- ; The task will not allow users to select options requiring a
- ; filename until they have confirmed the name found in the restore
- ; operation, but it does remember which option they wanted to
- ; perform and performs it after filename confirmation.
- ; Quiet flag ignored by shareware version.
- ; Latest : Use of new @BBHELP facility
- ; : Use of FMPTM and FMPSCR for expert users
- ; Version 1.20:
- ; : Addition of LIST for View option
- ; : Keyvals added
- ; : Default is now reserved word changed to defcol
- ; : Shellout option added
-
- var fmptm,20,$fmptm
- var fmpscr,20,$fmpscr
- var keyvals,8,'zDIESQVM' ;z is impossible (not UPPER case)
- int i ;saves choice
- int count ;Loop counter
- int deferred_choice ;Saves impossible choice numbers
- int fstat ;File verification status
- int main_choice ;Saves choice from outer menu
- int tskmac ;Remembers MAC or TSK
- var continue,12 ;Holds return label
- logical selected ;True is user specified a filename
-
- var char,1
- var default_drive,1
- var drive,2 ;Drive id followed by colon
- var editor,8,'LIST' ;Name of editor
- var extension,3 ;Last 3 characters of filename
- var file_bytes,1,occurs 14 ;Used to extract parts of SOURCE_FILE
- var filename,8,' TMDEV' ;1st 8 characters of filename
- var fullname,14 ;This contains filename without spaces
- var macname,14 ;The name of the MAC file
- var help_no,2
- var help_name,6
- var mac,1,"n" ;If Y: There is a MAC file for this TSK
- var mono,1,"y" ;If Y: Invoke Taskmaster with /M flag
- var names,1,"n" ;If Y: Invoke Taskmaster with /S flag
- var null,1 ;Used to reset FILENAME and EXTENSION
- var postflags,8 ;Editor flags after filename
- var preflags,8 ;Editor flags preceding filename
- var quiet,1,"n" ;If Y: Invoke Taskmaster with /Q flag
- var source_file,14,'c:test.tsk' ;Dummy filename
- var tm_flags,6
- var one_space,1,' '
- var two_spaces,2,' '
- var command_line,41
- var comspec,30,$comspec
-
- vconst attention,79 ;Highlight colour combination
- èvconst cel,55 ;Clear to end of line
- vconst cep,56 ;Clear to end of page (screen)
- vconst cls,11 ;Clear screen
- vconst defcol,5 ;Default colour combination
-
- end
-
- if comspec = null
- move 'c:\command' to comspec
- fi
- if fmpscr = null
- move 'SCR' to fmpscr
- fi
- if fmptm = null
- move 'TM' to fmptm
- fi
- move ddrive to default_drive
- lookfor tmdev.ovr ;Check forms available
- if not found
- forms logon.ovr ;in case /q and not registered
- insert filename filename
- put "NO_FORMS"
- stop
- fi
- forms tmdev.ovr ;open forms file for use
- display cls
- if colour
- move "n" to mono
- fi
- lookfor tmdev.tm ;if the task has been used previously
- if found
- restore 'tmdev.tm' source_file editor mac mono names quiet preflags postflags
- ; use old filename editor name and flag settings
- if resp ne 0
- Displayln "TMDEV: Failure during restoration of data from TMDEV.TM"
- wait "Please try deleting it - press any key to abort"
- stop
- fi
- restore
- put "HELP_GEN" wait 0 noclear
- else
- move '1INIT' to continue
- goto 1GETDEFAULTS
- 1INIT
- if anyfk
- stop
- fi
- put "HELP_GEN" wait 0 noclear
- fi
- move true to hide
- move 0c000h to bbmask ;<esc> and F1
- menu 1,'BBMENU'
- option 1,1
- clear selected
- until selected or funkey = 10
- è move '1GOTDEFAULTS' to continue
- goto 1GETDEFAULTS
- 1GOTDEFAULTS
- if selected
- if deferred_choice ne 0
- move deferred_choice to choice
- if not anyfk
- clear deferred_choice
- cursor 2 0 defcol cel "Now I can action your selection..."
- return 100
- fi
- else
- cursor 2 0 defcol cel "Filename confirmed..."
- fi
- else
- cursor 2 0 defcol cel "You must confirm a filename before "
- display "I can action your selection"
- put "HELP_GEN" wait 0 noclear
- move 10 to funkey
- fi
- fi
- return
- option 1,2
- option 1,3
- option 1,4
- option 1,6
- if not selected
- move hilite to deferred_choice
- move 1 to choice
- return 100
- fi
- cursor 2 0 defcol cep
- userline ;Prevents video mode change
- if choice = 2
- select drive
- run default_drive ':' fmptm 1 tm_flags 1 drive filename
- select default_drive
- cursor 21 50 attention " TMDEV: Press any key " defcol
- inkey char
- cursor 2 0 defcol cep
- upper char
- if keyvals ct char
- move fcol to choice
- return 100
- fi
- fi
- if choice = 3 or choice = 6 and mac = 'y' or mac = 'Y'
- move choice to i
- move tskmac to choice
- put 'TSKMAC'
- move hilite to tskmac
- move i to choice
- if choice = 6
- run 'list ' drive filename '.' display
- return
- è fi
- fi
- if choice = 6
- run 'list ' fullname
- return
- fi
- if choice = 3
- combine editor 1 preflags 1 into command_line
- if mac = 'y' or mac = 'Y'
- append filename '.' display to command_line
- else
- append fullname to command_line
- fi
- append 1 postflags to command_line
- move 1 to resp
- until resp = 0
- replace all two_spaces of command_line with one_space
- fi
- trim command_line
- move 0 to elevel
- run command_line
- if elevel ne 0 or resp ne 0
- cursor 21 50 attention " TMDEV: Press any key " defcol
- inkey char
- ; let user see the error message... (if there is one!)
- fi
- cursor 2 0 defcol cep
- fi
- if choice = 4
- select drive
- run default_drive ":" fmpscr 1 filename ' /p'
- select default_drive
- if resp ne 0
- put "HELP04"
- fi
- fi
- return
- option 1,7
- display defcol cls 'Please type EXIT<return> to return to TMDEV'
- run 'command'
- return
- option 1,5
- option 1,30 ;<esc>
- stop
- option 1,31
- move hilite to help_no with lead_zeroes
- combine "HELP" help_no into help_name
- move hilite to main_choice
- put help_name
- move main_choice to choice
- return
- endm 1
-
- 1GETDEFAULTS
- clear selected
- èuntil selected or anyfk
- append 8 to editor
- fieldfill source_file mac mono names quiet editor preflags postflags
- put 'NAME_EXT'
- if not anyfk
- get source_file mac mono names quiet editor preflags postflags
- upper mono quiet mac names
- sizevar tm_flags 0
- if mono = "Y"
- append '/m' to tm_flags
- fi
- if quiet = "Y"
- append '/q' to tm_flags
- fi
- if names = "Y"
- append '/s' to tm_flags
- fi
- trim editor preflags postflags source_file
- verify source_file using fstat source_file
- ; fstat must be 0: using an @file field!
- move source_file to file_bytes
- CLEAR count DRIVE extension filename char
- setscan source_file
- move zero to delim
- scan drive filename char extension
- trim filename extension
- combine drive filename '.' extension into fullname
- combine drive filename '.MAC' into macname
- if extension = "TSK"
- if filename = "TMDEV"
- cursor 1 0 attention "TMDEV cannot be used to develop itself!" defcol cel
- else
- dir fullname
- if found
- move true to selected
- else
- cursor 1 0
- ask selected cel 'Warning: No such file as ' source_file '. Proceed? '
- fi
- if mac = 'Y'
- dir macname
- if not found
- cursor 1 0 cel 'Error: No such file as ' macname ' Press a key'
- inkey char
- move 'N' to mac
- clear selected
- fi
- fi
- fi
- else
- cursor 1 0 attention "Tasks must have a filetype of TSK !" defcol cel
- inkey char
- move "TSK" to extension
- combine drive filename '.' extension into fullname
- verify fullname using fstat source_file
- è fi
- fi
- fi
- if not anyfk
- save 'tmdev.tm' source_file editor mac mono names quiet preflags postflags
- save
- fi
- ;saves data for next run.
- ;cursor 2 0 defcol cep
- GOBACK continue
- @VID
- @defaults bright,cyan,blue
- @nf NAME_EXT
- @FILE
- @acceptfk f10
- @logical
- @logical
- @logical
- @logical
- @string min1
- @string
- @string
- @col char,white,blue
- @window line0,column70,depth1,width8
- F10=Quit
- @col char,white,blue
- @window line 2,column5,depth 15,width70
- @drop under,offset 2
- @double_line
- @dim
- @gon
- 7-------------------------------------------------------------------9
- 0 Please confirm or edit details: 0
- 4----------------------------------------8--------------------------6
- 0 The name of the task being developed: 0 Use TAB, or to move 0
- 0 Filename [ ] 0 between fields. to 0
- 0 Separate MAC file [ ] Y or N 0 save any changes or F10 0
- 4----------------------------------------2----------------9 to quit 0
- 0 When invoking Taskmaster: 4---------6
- 0 Use Mono mode [ ] Show Formnames [ ] Use Quiet mode [ ] 0 0
- 4---------------------------------------------------------3 0
- 0 The Editor will be invoked as: 0
- 0 Editor_name {{pre_flags}} filename {{post_flags}} 0
- 0 Please specify: 0
- 0 Editor name [ ] Pre Flags [ ] Post Flags [ ] 0
- 1-------------------------------------------------------------------3
- @bright
- @END
- @nf BBMENU
- @bright
- @col char,white,blue
- @window line0,column0,depth2,width0
- @BBIMENU GREEN,BLUE
- @key bright,white,blue
- {Defaults }{Interpret }{Edit }{Scr }{Quit }{View }{MS-DOS shell }
- è@col char,white,blue
- @window line0,column70,depth1,width8
- F1=Help
- @BBHELP line 1,column 0,width 60,bright,white,red
- @HELP ' Change editor and application details and flags'
- @HELP ' Load a copy of Taskmaster to Interpret the named task '
- @HELP ' Load your nominated wordprocessor to Edit the task'
- @HELP ' Process the task using Scr to create an OVR or FORMS file'
- @HELP ' Leave this task - return from whence you came'
- @HELP ' Load LIST.COM to look at the nominated task'
- @HELP ' Get a DOS prompt for running things not on the menu '
- @END
- @nf HELP01
- @colour char,white,blue
- @GON
- @dim
- @WINDOW LINE 3,COLUMN 10,DEPTH 15,WIDTH 49
- @drop under,offset 2
- @outline cyan
- Defaults-Option-Help
- Hel≡ oε TMDEV.TSK║ Aε examplσ TASKMASTE╥ átasδ ì
- áfo≥ applicatioε developers« Singlσ sourceΣ fo≥ ì
- áCDO╙ o≥ M╙-DO╙ operation« (Uni° equivalen⌠ ái≤ ì
- áDEVELOP.TSK).
-
- á Yo⌡ ámus⌠ áconfirφ thσ namσ oµ ß átasδ ábeforσ ì
- áselectinτ áoption≤ requirinτ ß tasδ name« á Thσ ì
- átasδ áwil∞ ápolicσ this« Thσ áedito≥ ánamσ ái≤ ì
- áaskeΣ fo≥ onl∙ iµ thσ datafilσ TMDEV.T═ i≤ áno⌠ ì
- áavailable.
-
- Thσ áfilenamσ anΣ edito≥ namσ arσ árecordeΣ áiε ì
- áTMDEV.T═ fo≥ subsequen⌠ restoration.
- @END
- @nf HELP02
- @colour char,white,BLUE
- @GON
- @dim
- @WINDOW LINE 3,COLUMN 10,DEPTH 13,WIDTH 49
- @drop under,offset 2
- @outline cyan
- Interpret-Option-Help
- Thσ áINTERPRETÆ áoptioε load≤ áanothe≥ ácop∙ áoµ ì
- áTaskmaste≥ a≤ ß 'childº proces≤ whicΦ áattempt≤ ì
- át∩ executσ thσ nameΣ task« Wheε thi≤ á'childº ì
- áproces≤ ái≤ áterminateΣ á(duσ át∩ áerror≤ áá o≥ ì
- áexecutinτ áß STO╨ command⌐ contro∞ wil∞ áreturε ì
- át∩ TMDEV.
-
- Thσ PAT╚ wil∞ bσ useΣ t∩ locatσ Taskmaster« Iµ ì
- áyo⌡ áwisΦ át∩ ánominatσ áß áspecifiπ ácop∙ ááoµ ì
- áTaskmaste≥ pleasσ se⌠ thσ environmen⌠ ávariablσ ì
- áFMPT═ accordingl∙ (FMPT═ ha≤ n∩ othe≥ use).ì
- @END
- @nf HELP03
- @colour char,white,BLUE
- @GON
- è@dim
- @WINDOW LINE 3,COLUMN 10,DEPTH 6,WIDTH 49
- @drop under,offset 2
- @outline cyan
- Edit-Option-Help
- Thσ átasδ wil∞ bσ editeΣ usinτ thσ áedito≥ áyo⌡ ì
- ánominatσ usinτ thσ DEFAULT╙ option« B∙ defaul⌠ ì
- áLIS╘ ái≤ ánameΣ a≤ thσ editor¼ i⌠ i≤ áiε áfac⌠ ì
- ájus⌠ ß filσ viewer«
- @END
- @nf HELP04
- @colour char,white,BLUE
- @GON
- @dim
- @WINDOW LINE 3,COLUMN 10,DEPTH 14,WIDTH 49
- @drop under,offset 2
- @outline cyan
- SCR-Option-Help
- Thσ á SCRù áoptioε áload≤ áTH┼ áSCREE╬ áTEMPLAT┼ ì
- áPROCESSORù áiµ i⌠ i≤ availablσ whicΦ ácreate≤ áß ì
- áfilσ ácalleΣ TASKNAME.OV╥ containinτ áprocesseΣ ì
- áforms« á Yo⌡ ma∙ looδ a⌠ thσ forφ sourcσ á(i.e« ì
- ábeforσ áthe∙ havσ beeε processed⌐ b∙ áexamininτ ì
- áthσ TS╦ files╗ thσ form≤ arσ usuall∙ founΣ áa⌠ ì
- áthσ enΣ oµ thσ file.
-
- Thσ áPAT╚ wil∞ bσ useΣ t∩ locatσ SCR« á Iµ áyo⌡ ì
- áwisΦ t∩ nominatσ ß specifiπ cop∙ oµ SC╥ ápleasσ ì
- áse⌠ thσ environmen⌠ variablσ FMPSC╥ accordingl∙ ì
- á(FMPSC╥ ha≤ n∩ othe≥ use)«
- @END
- @nf HELP05
- @colour char,white,BLUE
- @GON
- @dim
- @WINDOW LINE 3,COLUMN 10,DEPTH 7,WIDTH 25
- @drop under,offset 2
- @outline cyan
- Quit-Option-Help
- Thσ qui⌠ optioε simpl∙
- áreturn≤ t∩ thσ ácallinτ ì
- áprocess¼ áááthi≤ áááái≤ ì
- áusuall∙ ááthσ ááCommanΣ ì
- áLinσ Interpreter.
- @END
- @nf HELP06
- @colour char,white,BLUE
- @GON
- @dim
- @WINDOW LINE 3,COLUMN 10,DEPTH 5,WIDTH 25
- @drop under,offset 2
- @outline cyan
- View-File-Option-Help
- Thi≤ áinvoke≤ áLIS╘ át∩ ì
- ávie≈ áthσ ásourcσ áfilσ ì
- áselected.
- @END
- @nf help07
- @colour char,white,BLUE
- @GON
- @dim
- @WINDO╫ LIN┼ 3,COLUM╬ 10,DEPT╚ 12,WIDT╚ 25
- @dro≡ under,offse⌠ 2
- @outline cyan
- MS-DOS-Shell-help
- è Thi≤ ááload≤ áááanothe≥ ì
- ácommanΣ interprete≥ át∩ ì
- áallo≈ áyo⌡ át∩ áperforφ ì
- áan∙ command≤ yo⌡ áwish« ì
- áTaskmaste≥ áááááremain≤ ì
- áloadeΣ áanΣ ááresident« ì
- áWheε yo⌡ wisΦ t∩ returε ì
- át∩ áTaskmaste≥ á simpl∙ ì
- áente≥ áEXITü (thi≤ á
- ámen⌡ wil∞ rσ-appear)
- @end
- @nf HELP_GEN
- @colour char,white,BLUE
- @GON
- @WINDOW LINE 3,COLUMN 10,DEPTH 11,WIDTH 60
- @outline cyan
- General-Help
- Please select the option you require using the <space
- bar>, <arrow keys> or <home> key and pressing .
-
- This is an instant Bounce-bar menu so you may press the
- first character of any topic - in which case is
- not needed.
-
- Context sensitive help is available: Highlight a topic
- and press function key <F1>.
- @end
-
- @nf tskmac
- @bbmenu cyan,blue
- @bright
- @win line0,column69,depth1,width10
- {TSK }{MAC }
- Select...
- @end
- @eof