JimmieHack
-
Posts
3 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by JimmieHack
-
-
Thanks. Here's a snippet of my code.
ASCII File Begin Process: "C:\Temp\Stock.csv" (Comma Delimited Text (.csv))
If Variable %T[1]% Does not Equal "%T[99]%"
Text Type (Use Clipboard and Paste Text): %T[1]% // InventoryEnd If
Text Type (Use Clipboard and Paste Text): %T[2]% // Stock#
Variable Set String %T[99]% to "%T[1]%" // Save Inventory
ASCII File End Process
-
When processing a CSV file and saving the columns into the %T% array, I'd like to be able to do something different every time %T[1]% changes. For instance, I have a CSV file with two columns and I want to process the file and refer to the previous line and save that value off to a variable as I'm processing it so I can refer to it later. Seems like such a simple thing to do, but nothing I've tried yet has worked. Any ideas?
ABC,123
ABC,324
ABC,567
DEF,345
DEF,786
ASCII File CSV Process
in Macro Express and Macro Express Pro
Posted
Thanks guys. Your replies have been very helpful and I've learned a lot since I originally posted this 6 months ago. I wish I could post a picture of what this screen looks like so you could understand the screen control. Imagine a screen where you have a prompt for Inventory that you would type a code such as MAIN and then press <Enter>. Then you'd type the Stock number such as 123456 and then press <Enter>. You'd then be able to type in several fields such as Description, Department, Quantity, etc and then when you file that entry, the prompt returns you back to the Stock Number prompt again where you can start entering the next number...or you can simply press <Enter> again and the screen control will take your cursor back up the Inventory field where you can enter the next inventory code.
Here's a revised version of my code. Let me know if you have any other thoughts on how to do this correctly because it isn't working. I'm open to other ideas as well.
ASCII File Begin Process: "C:\Temp\Stock.csv" (Comma Delimited Text (.csv))
If Variable %T[1]% Does not Equal "%INV%"
Text Type (Use Clipboard and Paste Text): %T[1]% // Inventory
Text Type (Simulate Keystrokes): <ENTER>
End If
Text Type (Use Clipboard and Paste Text): %T[2]% // Stock#
Text Type (Simulate Keystrokes): <ENTER>
((( Enter all the other fields )))
Text Type (Simulate Keystrokes): <F12><ENTER> // File
Variable Set String %INV% to "%T[1]%" // Save Inventory
ASCII File End Process