Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using vfp 5.0 and wp 9.0
Message
De
16/04/2001 13:28:54
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Using vfp 5.0 and wp 9.0
Divers
Thread ID:
00495855
Message ID:
00495855
Vues:
51
Can someone tell me what is wrong with this code? I'm trying ot run an existing wp 60 call and change it to a wp 90 call. I thought that I could simply change the 6's to 9's etc and go from there but nothing happens with i run the program:

parameter LetName,p1,p2,p3,p4,p5,p6,p7,p8
LETNAME = 'ADDRESS.FRM'

IF TYPE('WPPATH')='U' .or. type('MACROPATH')='U'
DO READINI WITH "PATHS.INI"
endif
wppath=allt(wppath)
wait wind 'word perfect path is ' + allt(wppath) timeout 20

macropath=allt(macropath)
IF right(WPPATH,1)<>"\"
WPPATH=WPPATH+'\'
IF .NOT. FILE(WPPATH+'WPWIN9.EXE')
WAIT "Can not locate WPWIN. Check PATHS.INI" window
return
ENDIF
ENDIF
IF right(MACROPATH,1)<>"\"
MACROPATH=MACROPATH+'\'
IF .NOT. FILE( macroPATh+letname)
WAIT "Can not locate letters. Check PATHS.INI" window
return
ENDIF
ENDIF
=ddeSetOption('safety',.f.)
wpchannum = DDEInitiate('WPWIN80_macros',"commands")
if wpchannum = -1
run_com=wppath+'wpwin9.exe : /u- '
wait run_com window nowait
wait "Please wait...loading WordPerfect..." window nowait
run /n7 &run_com
wpchannum=-1
** Wait for the WP program to load into memory
do while wpchannum=-1
wpchannum = DDEInitiate('WPWIN90_macros',"commands")
enddo
endif
wait "Merging data..." window nowait
=ddeExecute(wpchannum,'Application (A1; "WordPerfect"; Default; "US")')
=ddeExecute(wpchannum,'FileNew ()')
=ddeExecute(wpchannum,'HardReturn ()')
=ddeExecute(wpchannum,'DateText ()')
=ddeExecute(wpchannum,'HardReturn ()')
=ddeExecute(wpchannum,'HardReturn ()')
do p_line with p1
do p_line with p2
do p_line with p3
do p_line with p4
do p_line with p5
do p_line with p6
do p_line with p7
do p_line with p8
=ddeExecute(wpchannum,'HardReturn ()')
=ddeExecute(wpchannum,'HardReturn ()')
=ddeExecute(wpchannum,'AppMaximize()')
=ddeExecute(wpchannum,'WPActivate()')
wait clear
=ddeTerminate(wpchannum)
return


procedure p_line
parameter pline
if !empty(pline)
=ddeExecute(wpchannum,'Type ("' + pline + '")')
=ddeExecute(wpchannum,'HardReturn ()')
endif
return
Thanks in Advance.

J. Turner
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform