Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-08-2011, 01:32 PM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
Reading a text file containing special chars

I am reading a text file line by line -first by opening it:
' open the file for reading
Application.Macros(vbldMacroTemporary).Add "FILE", vbld_FSO().OpenTextFile("%HB_BTS_TEXT_FILE_FULLPAT H%")

and then parsing line by line with:
[vbld_TempMacroObj("FILE").ReadLine()]

Problem is the script fails when text file contains something like % as it thinks this is a macro.
So how can I parse line by line such a file containing special chars?
Reply With Quote
  #2  
Old 12-09-2011, 08:01 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
[vbld_EscapeString(vbld_TempMacroObj("FILE").ReadLi ne())]
http://www.kinook.com/VisBuildPro/Ma...scriptmisc.htm

Or use the Loop action.
http://www.kinook.com/VisBuildPro/Manual/loopaction.htm
Reply With Quote
  #3  
Old 12-09-2011, 10:08 AM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
thanks,it worked ok with:
[vbld_EscapeString(vbld_TempMacroObj("FILE").ReadLi ne())]
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 11:48 PM.


Copyright © 1999-2023 Kinook Software, Inc.