Category : Files from Magazines
Archive   : V13N15.ZIP
Filename : KTODAY.SC
Output of file : KTODAY.SC contained in archive : V13N15.ZIP
; KTODAY.SC Paradox for DOS
; (with thanks to Harry Goldman, Buffalo Grove, IL)
;
; This script will work only with field type, D - Date
;
; Use the SETKEY command to bind this script to the {Alt-T} key.
; For example, in a script use the following command:
;
; SetKey -20 Play "Ktoday"
;
; This script tests for the following conditions:
; - There must be a display image of the workspace
; (Table view or form view)
; - The current field must be Date type
; - The current field must be blank
; - The user must be in EDIT or COEDIT or DATAENTRY mode
; - The user can't be in FieldView mode
;
; An Error Procedure is defined to capture errors that could be
; caused 'after the fact'.
;
;-------------------------------------------------------------
Proc TodError()
private Err.n
Err.n = ErrorCode()
Switch
Case Err.n = 23 :
Beep
Message "Invalid Field Value: Validity checks prevent date entry?"
Sleep 3000
Return 1
Case Err.n = 20 :
Beep
Message "No Table Is On The Workspace"
Sleep 3000
Return 1
Endswitch
Endproc
Proc Tod()
private Quit.l, Errorproc
Quit.l = False
Errorproc = "TodError"
Switch
Case ImageType() <> "Display" : Quit.l = True
Case Fieldtype() <> "D" : Quit.l = True
Case IsFieldView() : Quit.l = True
Case Not Isblank([]) : Quit.l = True
Case Search("EDIT",Upper(Sysmode())) < 1
and Upper(Sysmode()) <> "DATAENTRY" : Quit.1 = True
Endswitch
If Quit.l Then
Beep
Quit
Endif
[] = Today()
EndProc
Today()
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/