Category: Scripting

Date Picker Dialog

August 27, 2007 by Marcus Tettmar in Scripting

Here’s a little script I wrote to give you a Date Picker dialog. Useful if you need to ask the user to select a date and want to make it easy for the user and avoid too much validation.

Read more »

Keep it Simple – Shortcuts and Applications

August 7, 2007 by Marcus Tettmar in Automation, Scripting

We had a customer email us the other day having a problem getting his macro to work reliably. He wanted to start an application, so he had written a macro to left click on the application’s shortcut on the desktop. But sometimes the icon moved. He wanted to know how to reliably know where the […]

Read more »

Methods for Accessing Excel Data

July 2, 2007 by Marcus Tettmar in Automation, Scripting

UPDATE: 25/09/2012 – This article was written in 2007 before Macro Scheduler contained native Excel functions and native database access. Furthermore, since this article was written Excel no longer supports DDE. This article has therefore been superseded and should only be used as a reference for use with older versions of Macro Scheduler and/or older […]

Read more »

Reading through text files in memory

by Marcus Tettmar in Scripting

Looping through a text file is commonly achieved with the ReadLn command in a loop, like the example in the help file: Let>k=1 Label>start ReadLn>c:\\\temp\\\test.txt,k,line If>line=##EOF##,finish MessageModal>line Let>k=k+1 Goto>start Label>finish This uses a very simple loop and loops through the file one line at a time using the ReadLn command and a counter variable. An […]

Read more »

Office 2007 VBA Shell Bug?

June 27, 2007 by Marcus Tettmar in Automation, Scripting

When trying to execute a third party application, such as Macro Scheduler, from VBA in Office 2007 using the Shell function the following error is returned: “Invalid procedure call or argument” Sometimes you might want to run a Macro Scheduler macro from Office using this method and get this error. Searching the web reveals many […]

Read more »

First Winner of Scripts & Tips Competition

May 18, 2007 by Marcus Tettmar in Announcements, Automation, Scripting

We have our first successful entry to the Scripts & Tips 10 Year Anniversary Competition. Robert White sent in this excellent Cookie Monitor script. It’s a nicely written script which is both very useful and also demonstrates effective use of a non-modal dialog and other scripting features such as looping, reading a list of files, […]

Read more »

How to Use Image Recognition

February 20, 2007 by Marcus Tettmar in Automation, Scripting

What is Image Recognition? Update. Image Recognition has been vastly improved and simplified since this article was written and in v13 we introduced an Image Recognition Code Wizard. Watch this video to see how simple it is. Image Recognition allows Macro Scheduler to find a bitmap (needle) in another, larger, bitmap (haystack) and return its […]

Read more »

Web Automation in Vista

December 5, 2006 by Marcus Tettmar in Announcements, Automation, Scripting, Vista

To run WebRecorder, or VBScript macros which automate Internet Explorer in Vista (IE7), you will first need to disable “Protected Mode”. Consider this simple VBScript code: Dim IE Set IE = CreateObject(“InternetExplorer.Application”) IE.Visible=1 IE.Navigate “http://www.mjtnet.com” In IE6 and in IE7 under XP this code would create a new IE instance and then navigate it to […]

Read more »

Sorting Bubbles

November 16, 2006 by Marcus Tettmar in Scripting

I’ve just posted a tip to Scripts ‘n Tips showing a simple Bubble Sort subroutine. The example sorts a list of files returned by the GetFileList function. I hope it’s useful. Here it is.

Read more »

Get Selected Tab Index

September 7, 2006 by Marcus Tettmar in Automation, Scripting

As you probably already know, selecting a page of a tab control is usually best achieved by sending CTRL-TAB. So on opening an application we can use the following Macro Scheduler code to jump to the third tab: SetFocus>Window_Title Press CTRL Press Tab * 2 Release CTRL This issues CTRL-TAB twice and therefore cycles through […]

Read more »