georgeberz Posted April 17, 2006 Report Share Posted April 17, 2006 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 Quote Link to comment Share on other sites More sharing options...
kevin Posted April 17, 2006 Report Share Posted April 17, 2006 Try the ASCII File Begin/End Process commands. This command requires that you separate each data element on each line with a comma or a tab. Quote Link to comment Share on other sites More sharing options...
georgeberz Posted April 17, 2006 Author Report Share Posted April 17, 2006 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 Quote Link to comment Share on other sites More sharing options...
kevin Posted April 17, 2006 Report Share Posted April 17, 2006 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. Quote Link to comment Share on other sites More sharing options...
georgeberz Posted April 18, 2006 Author Report Share Posted April 18, 2006 IT WORKS THANK YOU... I wonder why the file text process did not work... Quote Link to comment Share on other sites More sharing options...
kevin Posted April 18, 2006 Report Share Posted April 18, 2006 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%). Quote Link to comment Share on other sites More sharing options...
georgeberz Posted April 19, 2006 Author Report Share Posted April 19, 2006 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....?? Quote Link to comment Share on other sites More sharing options...
kevin Posted April 19, 2006 Report Share Posted April 19, 2006 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.