Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
STRTRAN not working
Message
 
 
To
12/06/2003 14:29:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00799472
Message ID:
00799530
Views:
25
This message has been marked as a message which has helped to the initial question of the thread.
When I step through your code, it does work. However, you are not storing the result of STRTRAN to anything if that is your intention.

>As I posted to Gerald, the below does not work either though:
>
>
>clear
>lcline=""
>lccode="REM Test.txt"+CHR(13)
>lccode=lccode+"COPY %1 <<IMPORTPATH>> <<IMPORTFILE>>"
>BG_ACCUWIN="C:\FOXPRO\TMP\"
>m.handle=FCREATE("test.txt")
>FOR i = 1 TO LEN(lccode)
>	IF ASC(SUBSTR(lccode,i,1))=13 .OR. ASC(SUBSTR(lccode,i,1))=13
>		lcline=lcline+CHR(13)+CHR(10)
>		? lcline
>	ELSE
>		lcline=lcline+SUBSTR(lccode,i,1)
>		IF "<<IMPORTPATH>>" $ lcline
>			?"Original lines: "+lcline
>			STRTRAN(lcline,"<<IMPORTPATH>>",BG_ACCUWIN)
>			?"New Lines: "+lcline
>			?"******************************"
>			WAIT WINDOW "Found <<IMPORTPATH>>"
>		ENDIF
>		IF "<<IMPORTFILE>>" $ lcline
>			?"Original line: "+lcline
>			STRTRAN(lcline,"<<IMPORTFILE>>","ACCUWIN.TXT")
>			?"New Line: "+lcline
>			?"******************************"
>			WAIT WINDOW "Found <<IMPORTFILE>>"
>		ENDIF
>	ENDIF
>ENDFOR
>=FPUTS(m.handle,lcline)
>=FCLOSE(m.handle)
>MODIFY COMMAND test.txt
>
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform