Jump to content
Macro Express Forums

Importing Text Variables T1, T2 T3 Etc


georgeberz
 Share

Recommended Posts

I am trying to import a file created in windows notepad a pure text file...

 

I have one data set on each line and I wanted to assign them to variables t1 to t50

 

When I load Text File Begin Process filename etc... the only variable that loads seems to be T1 and that with the last line in the .txt file...

 

I have been able to assign several T variables by reloading the Text file begin process several times and the end one selecting a single line each time...

 

I thought there was a better way?

 

Can Anyone help?

 

Thank you

 

George

559-469-8003

Fresno CA

Link to comment
Share on other sites

I cannot get these to load into variables with the asci one succested as a csv file? also tried a plain text file

 

BarterZilla a New Concept in Barter<<<<<

Check Out

http://barterzilla.com

a

detailperfections.com

 

This is what I want to access in MacroExpress

 

T1 = BarterZilla a New Concept in Barter<<<<<

T2 = Check Out

T3 = http://barterzilla.com

T4 = a

T5 = detailperfections.com

 

Perhaps someson could send me a working macro I could import and file to test? I must be missing something...

 

Or can someone send me a file that has any multi variables loading in a single command from a document...

 

Thank you

 

george@ytry.com

Link to comment
Share on other sites

Create a file that looks something like this:

BarterZilla a New Concept in Barter<<<<<, Check Out,http://barterzilla.com,a,detailperfections.com
"Insight Software Solutions, Inc.",Award Winning products,http://www.wintools.com,b,www.macros.com

Then create a macro like this:

ASCII File Begin Process: "text.txt" (Comma Delimited Text )
 // Here, T1, T2, T3, T4 and T5 contain your data
 
 //  ... Your macro commands go here ...
ASCII File End Process

The ASCII File Begin/End Process commands cause the macro to loop once for each line in the input text file. If any of the data contains a comma, you will need to surround that item with "s. The Insight Software Solutions, Inc. item in the sample data (above) illustrates this.

Link to comment
Share on other sites

The Text File Process command puts each line into a single variable (eg %T1%). The ASCII Text File Process command puts each record on a line into a separate variable (%T1% through %T5%).

The process seems to imply that it will imput each line into a variable...

 

"What To Process

 

If you want to process all the records that follow after the specified starting record, then choose "Process All Records". If you only want to process a certain range of records (or lines of text), then choose the "Process Partial Records". With this option checked, you will be able to enter the number of records you wish to process."

 

This is right out of the help button for the command for "textfile begin process"

 

I racked my brain for hours....

 

Is this a feature that was forgotten....??

Link to comment
Share on other sites

The Process Partial Records option allows you to skip a specific number of lines. The terminology can be confusing. In the paragraph you quote it states that a record is a line.

range of records (or lines of text)

My response

The ASCII Text File Process command puts each record on a line into a separate variable (%T1% through %T5%).
would have been clearer if I had said
The ASCII Text File Process command puts each field within a record (or a line) into a separate variable (%T1% through %T5%).

There are examples in the help that show how the ASCII Text Process and Text File Process commands work. We will review the help topics for these commands to see if we can make it clearer.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...