PreviousNext
Help > Programmation avec LAUNCHER Office > Les commandes LNCCMD > Liste des commandes > Commande MENUWAIT
Commande MENUWAIT

Attend un évènement sur le menu créé par la commande MENU.

 

Le programme client attend une action sur le menu personnalisé, ou bien la fermeture du menu, pour continuer son exécution.

 

Syntaxe

 

CHGVAR

VAR(&CMD) VALUE('MENUWAIT')

CHGVAR

VAR(&PARM1) VALUE(' ')

CHGVAR

VAR(&PARM2) VALUE(' ')

CALL

PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 +

&PARM2 &RESULT)

  

Exemple

 

       CHGVAR     VAR(&CMD) VALUE('MENU')                        

       CHGVAR     VAR(&PARM1) +                                  

                    VALUE('CAPTIONS="VALIDER;ANNULER";TIPS="VAL+ 

                    IDER LE DOCUMENT;ANNULER"')                  

       CHGVAR     VAR(&PARM2) VALUE(' ')                         

       CALL       PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 +    

                    &PARM2 &RESULT)                              

 

   /* ATTENTE CLICK SUR BOUTON  */                                  

              CHGVAR     VAR(&CMD) VALUE('MENUWAIT')                

              CHGVAR     VAR(&OPT) VALUE(' ')                       

              CHGVAR     VAR(&PARM1) VALUE(' ')                     

              CHGVAR     VAR(&PARM2) VALUE(' ')                     

              CALL       PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 +

                           &PARM2 &RESULT)                          

              IF         COND(&RESULT *NE '00000') THEN(GOTO +      

                           CMDLBL(WORDCLICK))                       

                                                                    

              GOTO       CMDLBL(FINISH)                             

                                                                    

 WORDCLICK:                                                         

              SNDMSG     MSG('CLICK = ' *TCAT &RESULT) TOUSR(QPGMR) 

 FINISH: