Not sure if this is doable, but has anybody written any code in AREV to bring up a screen saver(password protected) after a set time of idleness? Any help would be appreciated.
Eminently doable on a post index or replacement index check. I'm sure some of the earlier REVMEDIA diskettes had such a beast…
The Sprezzatura Group
World Leaders in all things RevSoft
FWIW, I've found it easier on a "replace" rather than a "post" index call, assuming you have a dedicated indexer elsewhere. You may then have to "reload" Input.Char() yourself, which can be done by forcing a pair of non-functional characters into the buffer e.g.
@Data=\1F1F\ ;* this presses Ctrl-Hyphen, twice.
One other thing to watch is how you prompt for the password. If you use the traditional MSG "RI" type note that this doesn't yield to windows, and the performance of other tasks can suffer after your AREV screen saver kicks in.
I can probably dig out some of my old code which drops a green and black mask over the window, so you can still see what the user was doing when it timed out. If you drop your email address to [email protected] I'll send you a copy.
Here is one, probably from an old toolkit - hit any key to exit:
EXPENDABLE SUBROUTINE SCREEN_SAVER
DECLARE FUNCTION VIDEO.RW, SOFT_LOGIN
DECLARE SUBROUTINE MSG, DELAY, PUSH.SESSION, POP.SESSION
$INSERT SYSINCLUDE, PRINT_CONSTANTS
$INSERT SYSINCLUDE, LOGICAL
* "program_status" values…
EQUATE QUIT$ TO 0
EQUATE INITIALIZE$ TO 1
EQUATE WAIT$ TO 2
EQUATE RESTORE$ TO 3
EQUATE VIDEO.RW_ERROR$ TO 4
program_status=INITIALIZE$
LOOP WHILE program_status
ON program_status GOSUB INITIALIZE, WAIT, RESTORE, VIDEO.RW_ERRORREPEAT
RETURN
INITIALIZE:
GET.CURSOR(cursor_info)PUSH.SESSION(ps_cursor, ps_sentence, ps_record, ps_id, ps_dict, ps_mv)save_high =@CRTHIGHfirst_time=TRUE$message =This space for hire!"row =0col =0add_row =TRUE$add_col =TRUE$max_col =79-LEN(message)left =0top =0right =79bottom =24image ="error =VIDEO.RW(left, top, right, bottom, "R", image)IF error THENprogram_status=VIDEO.RW_ERROR$END ELSEerror=VIDEO.RW(left, top, right, bottom, "C", "")IF error THENprogram_status=VIDEO.RW_ERROR$END ELSE@CRTHIGH=25program_status=WAIT$ENDENDRETURN
WAIT:
IF first_time THENfirst_time=FALSE$END ELSEPRINT @(-1)IF add_row THENrow += 1IF row EQ 24 THEN add_row=FALSE$END ELSErow -= 1IF row EQ 0 THEN add_row=TRUE$ENDIF add_col THENcol += 2IF col GE max_col THEN add_col=FALSE$END ELSEcol -= 2IF col LE 0 THEN add_col=TRUE$ENDENDPUT.CURSOR(CHAR(0):CHAR(0):CHAR(0):CHAR(0))PRINT @(col,row):@(NORMAL$):message:DELAY(.25)INPUT response, -1
IF LEN(response) THEN
program_status=IF SOFT_LOGIN(3) THEN RESTORE$ ELSE WAIT$
ENDprogram_status=IF LEN(response) THEN RESTORE$ ELSE WAIT$RETURN
RESTORE:
IF LEN(image) THENerror=VIDEO.RW(left, top, right, bottom, "W", image)ENDprogram_status=QUIT$@CRTHIGH =save_high
PUT.CURSOR(cursor_info)POP.SESSION(ps_cursor, ps_sentence, ps_record, ps_id, ps_dict, ps_mv)RETURN
VIDEO.RW_ERROR:
MSG("VIDEO.RW error #%1%.|Exiting SCREEN_SAVER...", "T5", "", error)program_status=RESTORE$RETURN
Thanks for all your help. I'll give these a try.