I’ve had the following in my pause command RMD file for some years now. It
looks as if I hit a problem with the caption being too long and set a limit of
100 characters. The tabs are inserted to pad the message so that the caption is
not truncated:
-- Process Caption length check:
IF vCaption NOT CONTAINS 'Database' THEN
IF vConnectDB IS NOT NULL THEN
SET VAR vCaption = (.vConnectDB & 'DataBase:' & .vCaption)
ELSE
SET VAR vCaption = ('R:Base Multi-DataBase Selector:' & .vCaption)
ENDIF
ENDIF
-- Check length so the caption does not exceed 100:
SET VAR vCaptLen = (SLEN(.vCaption))
IF vCaptLen > 100 THEN
PAUSE FOR 5 USING 'Caption is over 100 characters!' CAPTION 'Note:'
ENDIF
-- Process Message length check:
SET VAR vMessLen = (SLEN(.vMessage))
SET VAR vMessage = ( (CHAR(009)) + .vMessage + (CHAR(009)) + (CHAR(009)) )
-- 18/04/2009: increased all by 20
IF vCaptLen > .vMessLen THEN
SET VAR vDiffLen = (.vCaptLen - .vMessLen)
IF vDiffLen > 60 THEN
SET VAR vMessage = ( (CHAR(009)) + .vMessage + (CHAR(009)) )
IF vDiffLen > 70 THEN
SET VAR vMessage = ( (CHAR(009)) + .vMessage + (CHAR(009)) )
IF vDiffLen > 80 THEN
SET VAR vMessage = ( (CHAR(009)) + .vMessage + (CHAR(009)) )
ENDIF
ENDIF
ENDIF
ENDIF
I seem to remember, as well, that I preferred the message not to start hard on
the left of the display.
The code is still there so I presume it’s still working as I use this RMD file
everywhere.
(Any apparently undefined variables will have been defined earlier in the
process.)
Regards,
Alastair.
From: Albert Berry
Sent: Wednesday, May 29, 2013 5:44 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Pause Command: Window Width
Just for the fun of it:
SET VAR vCaption TEXT = 'Who writes captions this long?'
SET VAR vMessage TEXT = 'Blah Blah'
SET VAR vMessLength INTEGER = (SLEN(.vMessage))
SET VAR vCapLength INTEGER = (SLEN(.vCaption))
IF (SLEN(.vCaption)) > (SLEN(.vMessage)) THEN
SET VAR vMessage = ((SFIL(' ',.vCapLength) ) + .vMessage + (SFIL(' ',+
.vCapLength) ) + '.' )
ENDIF
PAUSE 2 USING .vMessage CAPTION .vCaption
RETURN
On 29/05/2013 9:46 AM, Bruce A. Chitiea wrote:
> The following representative PAUSE command:
>
>
>
> PAUSE 2 USING 'Blah Blah' +
>
> CAPTION 'Who writes captions this long??'