This script is designed to automate the process of inputting data from a spreadsheet into a program that only allows input one field at a time. By reading an exported file and simulating keystrokes, the script inputs each cell value into the corresponding field in the program.
The script is simple and easy to use, with no complicated setup or configuration required. All you need to do is prepare the data in a tab-delimited text file, open the order entry system, and drag and drop the file onto the script, then select the first field in the program. The script will wait three seconds then automatically input the data for you.
We are assuming you are running Microsoft Windows with VBScript (it comes standard). If this is inaccurate, a python example is also provided.
We are assuming that you can press tab to move to the next field, and that pressing enter will move to the next line.
- Open your spreadsheet program with the data formatted in the same order as the fields.
- Export the data as a text file. For example, in Microsoft Excel, Go to File -> Save As, and select text file. You do not want a string delimiter, and you want Tab delimited export.
- Place the script on your desktop with the csv file.
- Run the script by dragging the data-text file on to the
sendkeys.vbs
file (or python for non-windows environments). - The script pauses for three seconds, use this time to select the first field in the program.
- Watch as it inputs the spreadsheet data into the program.
Exporting the file will give you 1 tab per cell. So move the cells over to correctly give you the number of tabs.
https://gist.github.com/tatarize/37f664e0240bc1548ad3a43c7acc2021
For the updated version:
{wait 500}$1{tab}$2{enter}$3{tab}{tab}$6{tab}{tab}{tab}{tab}{tab}{tab}
Should be the needed filename/ordering, assuming the final part needs 6 tabs.