OzzieGeorge
Programmer
I thought I would put together a bit of a tutorial on how to get some use out of the Mach script editor and the ability to use the power of Excel to make rapid programming changes. This will probably be of most use to installers but we will discuss possible maintenance uses later.
As an example I’ll outline how to set 1212 for a list of consecutively numbered extensions. It can be as long a list as you want and even if there are a couple missing in the system it doesn’t matter as those lines of code will simply fail.
First open up Excel and in cell B1 type in the start extension number then click on another cell then click back on B1. Use the drag and fill option to fill in the number of cells needed and then select fill series, this will give you your extension list. Whilst this area is highlighted use copy and paste to duplicate the list in column C. Now in cell A1 type 1212 and drag and fill that column for the same number of cells only this time select copy cells. Finally put a * in cell E1 and drag and fill that down the column for the same number of cells as the other columns. You can then modify any odd entries in column C that need to be different (say for example you want to send the main switch number instead of the extension number you would swap the extension number in C to the same number of digits from the end of your main switch number).
So let’s look at what we have done in column A we have put the command we want to use. In column B we have put the first data and in column C we have put the data we want to enter. The star in column E is there to make the script have that many columns as that is what the mach script editor looks for.
If you wanted to you could copy the entries in column B (just highlight the cells not the column then select the blank cell immediately below the current entries and paste the list again then in the A column just below the last entry type 1213 and drag and fill then whatever is needed in column c and extend the stars in E. This would then mean it would programme CMD 1213 as well. I don’t know if there is a limit to the number of lines of script you can generate but I can just about do a full system in this way.
Now we have to get this from Excel and into the Mach script editor. The first thing we do is do a “save as” on the file from the file drop down menu. You can save it as any name you want and anywhere you want but in the save as type box you must select CSV (Comma delimited)(*.csv)
Excel will prompt you to save this under other formats but whether you do or not is up to you.
Now if you are using an older version of Matworx the file is useable as it is. Unfortunately version 6.3 and above needs a different format so we have to manipulate the data a bit, for that we will use Microsoft Word. Using Explorer find the csv file you just created right click on it and select open with then chose program. First making sure that the box for “always use the selected program to open this kind of file” is not ticked select Word. We need to do a couple of replacements so using replace the find will be , (comma) and the replace with will be “,” (quotation marks comma quotation marks) and do replace all. Then do another replace this time the find is ^p (shift6 and lowercase p) the replace is “^p” (quotation marks shift6 and lowercase p quotation marks) then all that is left to do is remove the “ from the end of the file and insert “ as the very first character. I’ve shown the characters in bold here for clarity but they don’t need to be bold. When this is done save the file and you are ready to switch to Matworx.
When you have established a connection to the system click on application and select Mach Script Editor. There are a number of Icon boxes across the middle of the window and the next to last one should be a suitcase like symbol with a right pointing arrow which if you place the mouse pointer over it will show the legend import scripts. Click on this icon and a windows style file browser will appear. Using this select the file you created earlier and click open you can then use the leftmost Icon which looks like an arrow running through three cogs to run the script.
And that is how it is done.
Enough typing for one day I’ll go into maintenance uses another day.