Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running a text file directly from a menu
Message
From
21/07/2004 12:58:46
 
 
To
21/07/2004 11:20:51
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00926569
Message ID:
00926623
Views:
20
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform