Jump to content
Macro Express Forums

Process Ascii Problem


marcoval
 Share

Recommended Posts

I just have had nothing but trouble with this command and can't get it to work. Basically what I want is to have in a CSV file a set of usernames and passwords, then have ME load these into variables, so Even variables will be usernames and Odd ones will be passwords. However I just can't get it to process the file right! I'm creating the password list in Excel 2000 and saving it as an MS-DOS CSV file which is attached (Obviously not with usernames and passwords..... )To test it I do this:

 

Clear Text Variables: All

ASCII File Begin Process: "test.csv" (Comma Delimited Text )

ASCII File End Process

Text Box Display: ( %T1%, %T4%, %T7%, %T97%

%T2%, %T5%, %T8%, %T98%

%T3%, %T6%, %T9%, %T99%)

 

No luck. This is what is displayed....

 

 

TEST98,,,

TEST99,,,

,,,

 

When the text box display in between the process I get this....

 

TEST1,,,

TEST2,,,

,,,

 

and when it hit ok at that point, it increments....

 

TEST3,,,

TEST4,,,

,,,

 

etc...

 

What am I not getting here? I want T1 to equal TEST1 and T99 to equal TEST99 with all points in between.

test.csv

Link to comment
Share on other sites

What you need to do is to put the macros that process the values from the .csv file between the Begin and End Process commands like this:

ASCII File Begin Process: "test.csv" (Comma Delimited Text )
 Text Box Display: Test
ASCII File End Process

In a .csv file there are records and fields. Each record is one separate line. Each field is separated by a , on the same line.

 

In the ASCII File Begin Process command, you choose the first variable to receive the content of the first field in each record. Subsequent fields are inserted into the next variable. For example, if you enter T1 in the ASCII File Begin Process command, then, for your example, the first field will be placed in T1 and the second field will be placed in T2.

 

Using the macro above and the first three records from your example file:

Test1,Test2

Test3,Test4

Test5,Test6

 

this is what will happen. The first time through the Begin/End loop T1 will be Test1 and T2 will be Test2. The second time through the loop T1 will be Test3 and T2 will be Test4. And the third time through the loop T1 will be Test5 and T2 will be Test6.

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...