Category: Scripting

SSH with Macro Scheduler

October 22, 2008 by Marcus Tettmar in Automation, Scripting

As you know Macro Scheduler has Telnet, FTP and HTTP functions built in (and with v11 FTP/HTTP will support SSL). But what if you want to run some other secure protocol such as SSH? We’ve taken the view not to reinvent the wheel and add every possible secure communications protocol to Macro Scheduler, especially as […]

Read more »

Extract Filename and Folder from Path

July 31, 2008 by Marcus Tettmar in Scripting

Here’s a quick way to extract just the filename from a full path: Let>file_path=C:\Program files\Skype\Phone\Skype.exe //get the file name on its own Separate>file_path,\,parts Let>exe_name=parts_%parts_count% //now get just the folder path MidStr>file_path,1,{length(%file_path%)-length(%exe_name%)},folder_only This uses Separate to explode the path into an array using the ‘\’ character as the delimiter. We’ve called the array “parts”. “parts_count” contains […]

Read more »

Quoting Quotes

July 24, 2008 by Marcus Tettmar in Scripting

VBScript and Complex Expressions use the ” (double quote) character to delimit strings. Native MacroScript code doesn’t need delimited strings. But if you need to use Complex Expressions or VBScript you need to remember that strings must be delimited in quotes. One implication of this is that if the string already has a ” character […]

Read more »

Using Variables and When to use Percent Symbols (%variable%)

July 4, 2008 by Marcus Tettmar in Scripting

By default in Macro Scheduler you do not have to do anything special to refer to a variable. The following will create a variable called Name: Let>Name=Freddy Name is now assigned the value of Freddy. Referring to Variables: The following will display a message box containing the word “Freddy”: MessageModal>Name Macro Scheduler knows that Name […]

Read more »

Macro Scheduler 10.1.15 is 40 Times Faster!

May 23, 2008 by Marcus Tettmar in Announcements, Automation, Scripting

With the latest release (10.1.15) we worked on optimizing the way variables are stored internally and were able to dramatically improve performance. Dick Lockey did some tests and writes that the latest version is 40 times faster than earlier versions! If you’re working with scripts that create and process a large number of variables – […]

Read more »

Attaching to an existing Internet Explorer instance

May 7, 2008 by Marcus Tettmar in Automation, Scripting

There are various scripts on the forums demonstrating how to automate Internet Explorer via VBScript and IE’s Document Object Model. Such as this one: Automate web forms with IE These require that the script creates the Internet Explorer instance via a CreateObject call. The script then has access to the IE object and can access […]

Read more »

Converting Office VBA to VBScript

April 28, 2008 by Marcus Tettmar in Scripting

If you have macros in Microsoft Word, Excel or Access they will be written in VBA – Visual Basic for Applications. If you wish to use this code inside Macro Scheduler you can convert this code to VBScript. However you cannot just copy the code and paste it into Macro Scheduler – or even into […]

Read more »

Retrieve Entire Excel Sheet Using DBQuery

April 16, 2008 by Marcus Tettmar in Scripting

UPDATE: 25/09/2012 – Macro Scheduler now includes some native Excel functions (XLOpen, XLGetCell, XLSetCell) etc. DDE is also no longer supported in the latest version of Excel. Using DBQuery, as described here, is still a very useful way to retrieve Excel data, especially for doing SQL style lookups. Last July I wrote this post summarising […]

Read more »

Using Macro Scheduler’s Database Functions

April 15, 2008 by Marcus Tettmar in Automation, Scripting

Macro Scheduler 10.1 includes four functions for connecting to databases, querying and modifying data: DBConnect DBQuery DBExec DBClose Connecting to a Database Before you can connect to a database you’ll need to make sure you have the required OLE DB/ODBC drivers installed. You can see what drivers are already installed under Control Panel > Administrative […]

Read more »

How to use Include

April 3, 2008 by Marcus Tettmar in Scripting

Dick Lockey has written a nice example in Scripts ‘n Tips showing a good use of the Include statement. Include allows you to include other scripts in your code. A good use of this is to keep commonly used subroutines, VBScript code, or dialogs in scripts that you can then Include in your macros, rather […]

Read more »