Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running a text file directly from a menu
Message
De
21/07/2004 12:58:46
 
 
À
21/07/2004 11:20:51
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00926569
Message ID:
00926623
Vues:
21
Hi Hilmar,

My problem is where do I put this command 'run /n start c:\docs\PostList.txt
' because the submenu is picking up the name from the label field and If I add this command to the prg I am using to bring up the submenu then system crashes.


This is my prg :

use AsbDoc AGAIN in 0 share
SELECT AsbDoc
go top

DO WHILE !EOF()
recno=recno()
replace AsbDoc.ad_command with 'do txt with '+ alltrim(str(recno))
SKIP
ENDDO

select AsbDoc
set near on
set order to menu

DEFINE BAR 1 OF asbosre PROMPT "\DEFINE BAR 2 OF asbosre PROMPT "\DEFINE BAR 3 OF asbosre PROMPT "\
ON BAR 2 OF asbosre activate popup keydoc
ON BAR 3 OF asbosre ACTIVATE POPUP oth

DEFINE POPUP keydoc && First one equal to 'D'
seek('D')
i=1
do while(AsbDoc.ad_menu='D')
DEFINE BAR i of keydoc PROMPT (Allt(AsbDoc.ad_label))
comm = alltrim(AsbDoc.ad_command)
ON SELECTION BAR i of keydoc &comm
i=i+1
skip
enddo

DEFINE POPUP oth
seek('O')
i=1
do while(AsbDoc.ad_menu='O')
DEFINE BAR i of oth PROMPT AsbDoc.ad_label
comm=alltrim(AsbDoc.ad_command)
ON SELECTION BAR i of oth &comm
i=i+1
skip
enddo

select AsbDoc
use


Basically this code checks for the labels the user has given to the text files and shows them in the sub menu. There could a number of these appearing in the submenu that match the above criteria.

Where and how can I run the worpad.exe when the user select one label from the submenu?

Thanks in advance

Zaheed
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform