WizardReq TITLE "Memo Wizard" LABEL "This Wizard will create an Office Memorandum for you." LABEL "" LABEL " Click Next or press Enter to continue to the next step" LABEL " click Previous to return to the previous step, if available" LABEL " click Cancel to quit without creating a memo or" LABEL " click Finish to create a memo using the default parameters." BUTTON 1 "_Next" BUTTON 2 "_Finish" BUTTON "-1" "_Cancel"
If Result = -1 THEN
EXIT
IF Result = 2 THEN
SIGNAL MAKEMEMO
/* Step 1 */
STEP1:
WizardReq TITLE "Memo Wizard" LABEL "Please type your name:" TEXTBOX 1 "N_ame:" CONTENTS deffromname BUTTON 1 "_Next" BUTTON 2 "_Previous" BUTTON 3 "_Finish" BUTTON "-1" "_Cancel"
buttonresult = Result
If buttonresult = -1 THEN
EXIT
If buttonresult = 2 THEN
SIGNAL START
Wizard_GetTextBox 1
fromname = Result
if fromname = "" THEN
fromname = memofromname
If buttonresult = 3 THEN
SIGNAL MAKEMEMO
/* Step 2 */
STEP2:
WizardReq TITLE "Memo Wizard" LABEL "Please type the recipient's name:" TEXTBOX 1 "N_ame:" CONTENTS deftoname BUTTON 1 "_Next" BUTTON 2 "_Previous" BUTTON 3 "_Finish" BUTTON "-1" "_Cancel"
buttonresult = Result
If buttonresult = -1 THEN
Exit
If buttonresult = 2 THEN DO
deffromname = fromname
SIGNAL STEP1
END
Wizard_GetTextBox 1
toname = Result
if toname = "" THEN
toname = memotoname
If buttonresult = 3 THEN
SIGNAL MAKEMEMO
/* Step 3 */
STEP3:
WizardReq TITLE "Memo Wizard" LABEL "Please type the subject of the memo:" TEXTBOX 1 "_Subject:" CONTENTS defsubject BUTTON 1 "_Next" BUTTON 2 "_Previous" BUTTON 3 "_Finish" BUTTON "-1" "_Cancel"
buttonresult = Result
If buttonresult = -1 THEN
Exit
If buttonresult = 2 THEN DO
deftoname = toname
SIGNAL STEP2
END
Wizard_GetTextBox 1
subject = Result
if subject = "" THEN
subject = memosubject
if buttonresult = 3 THEN
SIGNAL MAKEMEMO
STEP4:
WizardReq TITLE "Memo Wizard" LABEL "Do you want copies of the memo" LABEL "to go to anyone else?" BUTTON 1 "_Yes" BUTTON 2 "_No" BUTTON "-1" "_Cancel"
buttonresult = Result
If buttonresult = -1 THEN
Exit
IF buttonresult = 1 THEN DO
ccon = 1
ccnum = 0
ccname. = ""
Finished = 0
DO WHILE Finished = 0
ccnum = ccnum + 1
WizardReq TITLE "Memo Wizard" LABEL "Please type the name of someone that" LABEL "is to receive a copy of the memo:" TEXTBOX 1 "Nam_e:" BUTTON 1 "_Another" BUTTON 2 "No _More" BUTTON "-1" "_Cancel"