Because we think there is still a lot of value in the freeware, we would like to give you a few tips to overcome some of the limitations, if you would like to keep using the freeware for your personal tasks.
1. Existing macro files can easily be copied to bookmarks through the clipboard: open the macro file in any text editor, copy its contents to the clipboard and paste over an existing bookmark macro which is open in the macro editor. If you do not have any bookmark macro, start recording to create one. Use SaveAs to save with a new name.
2. Long macros can be divided in smaller chunks and played one after the other. Just be aware that variables and macro settings are reset after each play.
3. To input data from CSV files, use an html file with a table where your data is displayed on a Chrome tab (see below.) Tag the table elements from that tab instead of reading from a file. Excel can save a worksheet (an imported CSV file) to html.
4. Besides the 3 user variables (!VAR1, !VAR2, and !VAR3), the !EXTRACT macro variable can also be used to "park" values. Or one can, as above, make use of an auxiliary html file loaded in a Chrome tab. A dummy form like in http://demo.imacros.net/Automate/AutoDataEntry might be all you need.
Sample HTML page to load a local CSV file and display it as a table in the browser:
Code: Select all
<html>
<head>
<style>
.table
{
width: 100%
}
.row .cell
{
padding: 5px;
border: 1px solid black;
}
</style>
<script>
window.onload = function () {
var datasource = document.getElementById('datasource');
datasource.addEventListener('change', function (e) {
var csvFile = datasource.files[0];
var fileReader = new FileReader();
fileReader.onloadend = function (e) {
var table = document.getElementById('table');
var lines = fileReader.result.split(/\r?\n/);
var n = 0;
lines.forEach(function (line) {
n++;
var tr = document.createElement("tr");
tr.setAttribute("class", "row");
tr.setAttribute("id", "row_" + n);
var cells = line.split(/,/);
var m = 0;
cells.forEach(function (cell) {
var td = document.createElement("td");
m++;
td.setAttribute("id", "cell_" + n + "-" + m);
td.setAttribute("class", "cell");
var text = document.createTextNode(cell);
td.appendChild(text);
tr.appendChild(td);
});
table.appendChild(tr);
});
}
fileReader.readAsText(csvFile);
}, false);
}
</script>
</head>
<body>
Select CSV file:
<input type="file" id="datasource" />
<div>Table with loaded CSV file:</div>
<table id="table" class=table></table>
</body>
</html>