At 11:09 AM 3/9/2008, Steve Breen wrote:
Can any one let me know where I can learn more about how CHAR works.
I am just not grasping an understanding of this concept yet
Steve,
Here are a few examples that should demonstrate the typical use:
-- Example 01
-- Multi-Line DIALOG and PAUSE 2 Command
CLS
CLEAR VAR vCaption,vDialogMessage,vYesNo,vEndKey
SET VAR vCaption TEXT = ' Your Dialog Caption Here ...'
SET VAR vDialogMessage TEXT = NULL
SET VAR vYesNo TEXT = NULL
SET VAR vEndKey TEXT = NULL
SET VAR vDialogMessage = +
((CHAR(013)) + +
(CHAR(009))+'Line 1:'+(CHAR(009))+(CHAR(009))&'Contents of Line
1'+(CHAR(009))+(CHAR(013))+ +
(CHAR(009))+'Line 2:'+(CHAR(009))+(CHAR(009))&'Contents of Line
2'+(CHAR(009))+(CHAR(013))+ +
(CHAR(009))+'Line 3:'+(CHAR(009))+(CHAR(009))&'Contents of Line
3'+(CHAR(009))+(CHAR(013))+ +
(CHAR(009))+'Line 4:'+(CHAR(009))+(CHAR(009))&'Contents of Line
4'+(CHAR(009))+(CHAR(013))+ +
(CHAR(009))+'Line 5:'+(CHAR(009))+(CHAR(009))&'Contents of Line
5'+(CHAR(009))+(CHAR(013))+ +
(CHAR(009))+'Line 6:'+(CHAR(009))+(CHAR(009))&'Contents of Line
6'+(CHAR(009))+(CHAR(013))+ +
(CHAR(009))+'Line 7:'+(CHAR(009))+(CHAR(009))&'Contents of Line
7'+(CHAR(009))+(CHAR(013))+ +
(CHAR(009))+'Line 8:'+(CHAR(009))+(CHAR(009))&'Contents of Line
8'+(CHAR(009))+(CHAR(013))+ +
(CHAR(009))+'Line 9:'+(CHAR(009))+(CHAR(009))&'Contents of Line
9'+(CHAR(009)))
CLS
DIALOG .vDialogMessage vYesNo vEndKey YES +
CAPTION .vCaption +
ICON APP +
OPTION TITLE_FONT_COLOR BLACK +
|TITLE_BACK_COLOR WHITE +
|TRANSPARENCY 255 +
|WINDOW_BACK_COLOR WHITE +
|BUTTON_YES_CAPTION &Start +
|BUTTON_NO_CAPTION &Cancel +
|BUTTON_YES_COLOR GREEN +
|BUTTON_NO_COLOR RED +
|BUTTON_YES_FONT_COLOR WHITE +
|BUTTON_NO_FONT_COLOR WHITE
IF vYesNo IS NULL OR vEndKey = '[Esc]' THEN
SET VAR vMsg = ((CHAR(009))+'[Esc] key was
pressed!'+(CHAR(009))+(CHAR(009)))
PAUSE 2 USING .vMsg CAPTION .vCaption +
ICON APP Button 'Press any key to continue ...' +
OPTION BACK_COLOR WHITE +
|MESSAGE_COLOR WHITE +
|MESSAGE_FONT_COLOR GREEN +
|BUTTON_COLOR WHITE +
|BUTTON_FONT_COLOR GREEN
GOTO Done
ENDIF
IF vYesNo = 'No' THEN
SET VAR vMsg = ((CHAR(009))+'[Cancel] button was
pressed!'+(CHAR(009))+(CHAR(009)))
PAUSE 2 USING .vMsg CAPTION .vCaption +
ICON APP Button 'Press any key to continue ...' +
OPTION BACK_COLOR WHITE +
|MESSAGE_COLOR WHITE +
|MESSAGE_FONT_COLOR GREEN +
|BUTTON_COLOR WHITE +
|BUTTON_FONT_COLOR GREEN
GOTO Done
ENDIF
IF vYesNo = 'Yes' THEN
SET VAR vMsg = ((CHAR(009))+'[Start] button was
pressed!'+(CHAR(009))+(CHAR(009)))
PAUSE 2 USING .vMsg CAPTION .vCaption +
ICON APP Button 'Press any key to continue ...' +
OPTION BACK_COLOR WHITE +
|MESSAGE_COLOR WHITE +
|MESSAGE_FONT_COLOR GREEN +
|BUTTON_COLOR WHITE +
|BUTTON_FONT_COLOR GREEN
GOTO Done
ENDIF
LABEL Done
CLEAR VAR vCaption,vDialogMessage,vYesNo,vEndKey
RETURN
-- Example 02
-- Multi-Line PAUSE with Custom Button
CLS
CLEAR VAR vCaption,vPauseMessage
SET VAR vCaption TEXT = ' Multi-Line Pause with Custom Button'
SET VAR vPauseMessage TEXT = NULL
SET VAR vPauseMessage = +
((CHAR(013)) + +
'Line 1:'+(CHAR(009))+(CHAR(009))&'Contents of Line
1'+(CHAR(009))+(CHAR(013))+ +
'Line 2:'+(CHAR(009))+(CHAR(009))&'Contents of Line
2'+(CHAR(009))+(CHAR(013))+ +
'Line 3:'+(CHAR(009))+(CHAR(009))&'Contents of Line
3'+(CHAR(009))+(CHAR(013))+ +
'Line 4:'+(CHAR(009))+(CHAR(009))&'Contents of Line
4'+(CHAR(009))+(CHAR(013))+ +
'Line 5:'+(CHAR(009))+(CHAR(009))&'Contents of Line
5'+(CHAR(009))+(CHAR(013))+ +
'Line 6:'+(CHAR(009))+(CHAR(009))&'Contents of Line
6'+(CHAR(009))+(CHAR(013))+ +
'Line 7:'+(CHAR(009))+(CHAR(009))&'Contents of Line
7'+(CHAR(009))+(CHAR(013))+ +
'Line 8:'+(CHAR(009))+(CHAR(009))&'Contents of Line
8'+(CHAR(009))+(CHAR(013))+ +
'Line 9:'+(CHAR(009))+(CHAR(009))&'Contents of Line 9'+(CHAR(009)))
CLS
PAUSE 2 USING .vPauseMessage CAPTION .vCaption +
ICON APP Button 'Press any key to continue ...' +
OPTION BACK_COLOR WHITE +
|MESSAGE_COLOR WHITE +
|MESSAGE_FONT_COLOR GREEN +
|BUTTON_COLOR WHITE +
|BUTTON_FONT_COLOR GREEN
LABEL Done
CLEAR VAR vCaption,vPauseMessage
RETURN
Enjoy!
Very Best R:egards,
Razzak.
--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]
(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
================================================