Mindy79 Posted April 5, 2012 Report Share Posted April 5, 2012 I have tab delimeted files i need to run against my other software. Po box,123,utah Lexing,568,ohio Pixar,245,new york I need to say if T3=Utah then open software if T3=ohio then open notepad else close I can make macro run 1st row (utah) but how do i tell it to go next row to see ohio and new york? My macro just repeat the same row over and over again which is utah. Please help Quote Link to comment Share on other sites More sharing options...
Cory Posted April 5, 2012 Report Share Posted April 5, 2012 Using ASCII File Process it should give you a different value each time. Post a clip of your code and I can probably figure out what's going wrong for you.Or better yet export that macro to an MEX file and post it as an attachment. BTW you should try to use named variables instead of the old ME3 style vars. In your example I assume you mean %T[3]% when you write "T3". Quote Link to comment Share on other sites More sharing options...
Samrae Posted April 6, 2012 Report Share Posted April 6, 2012 @Mindy79: This is the Macro Express Pro discussion forum. There is a separate forum area for discussions about Macro Express 3. The example that follows is for Macro Express Pro but the same technique applies to Macro Express 3. You need to surround the macro commands that you want repeated with an ASCII File Begin Process followed by an ASCII File End Process command. Like this: ASCII File Begin Process: "c:\test.csv" (Comma Delimited Text (.csv)) If Variable %OneRecord[3]% Equals "Utah" Activate or Launch: Window "Notepad", Program "Notepad.exe", Parameters "" End If ASCII File End Process The code within the Begin/End Process command will repeat once for each line in your file. With each loop, the content of the variables will change. There is an example of how this works in the sample macros file. Look for samples.mex in the folder where the Macro Express or Macro Express Pro program files are installed. Or, you may download it from the Sample Macros page. Make sure to download the appropriate samples.mex file for Macro Express or Macro Express Pro. 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.