Marcus' Macro Blog

Tips and News on Macro Recording and Automating Windows with Macro Scheduler

Archive for the ‘General’ Category

Saving You Time and Money With Robotic Process Automation

Thursday, March 15th, 2018 by Marcus Tettmar

Before Macro Scheduler existed I was a junior member of an IT department. As part of my job I built small tools to automate specific tasks. At the time I was using VB. Each time I had to automate a task I had to reinvent the wheel a little.

The whole point of Macro Scheduler was to simplify the task of building automation routines, or software robots. To avoid having to reinvent the wheel.

There’s no reason why you can’t automate your Excel-to-SAP/WEB/ERP/ACME-Desktop-App by writing code using C# or C++. But it’s going to take you longer than using Macro Scheduler. Macro Scheduler functions like “SendText” and “UISetValue” encapsulate some pretty low level and quite convoluted code. The code wizards and macro recorders which help you use them are even more complicated.

One of the main purposes of Macro Scheduler is therefore to enable people to automate things more quickly and more easily than could be done with traditional programming tools. It makes it possible for non-programmers but also simplifies and speeds up automation for developers.

Over the last 21 years – yes 21, Macro Scheduler was first launched in 1997! – we’ve helped people with a lot of automation tasks. We offer consultancy and have been into people’s offices and also helped over the phone and remote desktop. Most routines take us a few hours to create a macro for. Some take a day or two. Rarely do we need to spend more than three days on one process, though there are some projects which involve a series of automation routines that may therefore take longer or be done over a few sessions.

To do the job from scratch with C#, C++ or VB might take weeks. Many people who approach us seem to be imagining that to automate their task may take days or weeks. They are often very surprised when we tell them it’s a few hours not a few days.

We are all about saving time and money. That’s what our tools do and it’s why we built them. Our tools mean you don’t have to pay developers lots of money to spend weeks or months building custom solutions.

The only down side to this from our point of view is that we routinely disappoint large consultancy businesses and potential partners who are used to selling IT contracts worth hundreds of thousands. They approach us thinking that there’s a huge opportunity and that we’ll pay them a large cut of a big consultancy project.

But rarely does a job require so much time, and that’s the reason we’re here. Sometimes I sense these people want us to “flesh” projects out. They think we’re “too good” at what we do. We should slow down, make things more complicated and thus charge for more time.

But that isn’t us. That’s not why we’re here or why we created Macro Scheduler. The whole ethos of Macro Scheduler and MJT Net Ltd is to save time, to find more efficient, less expensive ways of doing things that were once thought impossible or too expensive to do, and to enable people to automate without specialised knowledge.

That said we’re happy to work with companies on an on-going basis. I have found that most businesses approach us with one specific routine in mind and then when they see what can be done they realise how it can be applied across the organisation in other departments, for other teams. Saving a team one hour a week may not seem like much, but do that for 500 other teams and it adds up to a huge efficiency saving for the entire business.

If you would like to talk to us to find out how we could help your business, whether on an ongoing basis or just for a one-off job, please drop me a line here.

Happy New Year – Welcome to 2018!

Tuesday, January 2nd, 2018 by Marcus Tettmar

Just a quick note to say Happy New Year to all our customers. This year will be our 21st year of selling Macro Scheduler. I think that’s pretty amazing. Thanks for all your support over the years and for continuing to use Macro Scheduler. It’s always great to hear how Macro Scheduler helps in your work and business processes, so please continue to keep in touch and let us know how it’s helping you. Here’s to a happy and healthy 2018!

What is Robotic Process Automation (RPA)?

Wednesday, October 11th, 2017 by Marcus Tettmar

Our longstanding customers will know we’ve never really been into jargon here at MJT. Jargon in the IT industry tends to come and go. And there’s something quite amusing about a term that pops up and is touted as being some amazing new thing when it simply describes something we’ve been doing here at MJT Net Ltd for 20 years! On the other hand any term that helps to describe what we do is useful and I suppose it’s nice to know that finally, after all this time, what we do in our little niche of the IT world now has a name: Robotic Process Automation or RPA.

So those of you who have been using Macro Scheduler for a while know what RPA is, even if you’ve never called it that.

Robotic Process Automation tools allow you to create “bots” (we’ve always called them macros) to automate business processes (often by simulating a user). With RPA we automate repetitive tasks – taking the robot out of the human – freeing people up for more value-adding activities.

Our customers have been automating their processes robotically for years, ever since Macro Scheduler was first released way back in 1997.

Morning Rant

Friday, August 11th, 2017 by Marcus Tettmar

A customer filing PayPal disputes rather than emailing us and then, despite confirming that they have the software, failing to cancel the dispute and PayPal finding in their favour, leaving us out of pocket!

PayPal is costly and causes so many accounting headaches it isn’t true. I’ve a good mind to remove it from our site. How many people only buy because we accept PayPal? Anyone?

Another “customer” asking us to write a script, watching us write code, seeing it working, speaking favourably throughout the project at every step, never voicing any concern and then refusing to pay at the end. What’s the answer, lawyers and contracts, which would mean we’d have to put the prices up, or just stop offering script development services? Answers below.

Maybe give up completely. It isn’t what it used to be. This was fun in the early Internet days. Now it just feels like everyone wants something for nothing. Convince me otherwise below.

Our 20th Year!

Monday, February 6th, 2017 by Marcus Tettmar

Happy New Year! A somewhat belated new year greeting, but one that comes with the realisation that this year marks the 20th year of Macro Scheduler. The first version was released way back in 1997!

20 years! Quite amazing. It all happened by accident really and I certainly didn’t expect it to still be going strong 20 years later. In fact it’s stronger than ever.

Thanks so much to all of our customers for all your support and feedback, helping to make Macro Scheduler the product it is. Some of you have been around since that very first year and still use the software today, and that makes me very proud.

Here’s to another 20 years!

Templates and Default Templates

Wednesday, January 25th, 2017 by Marcus Tettmar

Did you know you can create script templates to use when you create new macros in Macro Scheduler?

When you create a new macro you can choose File/New Macro from Template. This allows you to browse for a .scp file to use as a template. There are some pre-built templates in the Templates subfolder of the program folder which by default you will be presented with.

To create your own templates just create a script as normal or use the standalone editor and export it to a name and folder of your choice. You can then use it later with the “New Macro from Template” option.

If you’re always writing the same stuff when you create a new macro – e.g. maybe you have a standard way of documenting your macros with a code block at the top, you might find default templates really useful. You will probably have noticed that “from the factory” Macro Scheduler puts some comments at the top of all new scripts. You can change this or add your own comments/code by creating a default template.

To create a default template create a script file called default.scp and store it in a Templates subfolder beneath your main macro folder (usually My Documents\Macro Scheduler 14). This default template will then be loaded whenever you create a new macro using File/New Macro.

Image Recognition Kudos

Thursday, January 12th, 2017 by Marcus Tettmar

It’s always nice to receive unsolicited praise. I thought I would share this with you which was sent into us from one of our customers, Lee Hightire:

“You have an Incredibly Awesome product! I just used the Image Recognition tool to help me get at an item in the Sys Tray (needed to pause syncing of OneDrive). I was beating my head against the wall trying other methods, and the Image Recognition tool essentially wrote the code (and trust me, I needed it to do so). I just wanted to say thanks.”

Toast Notification Window for your Scripts

Wednesday, September 7th, 2016 by Marcus Tettmar

Over in the forums dtaylor has posted a script library which allows you to show a small notification window in the lower right of your screen. Useful for reporting on progress during your script, in loops etc.

Grab it here.

Capture Screen Text using OCR

Friday, August 5th, 2016 by Marcus Tettmar

Here’s a way to get screen text from any application – even from an image – using OCR and a free open source tool called Tesseract.

First, you need to download and install Tesseract. You can get it here.

Tesseract is a command line utility. The most basic syntax is:

tesseract.exe input_image_file output_text_file

So you could call it from a Macro Scheduler script something like this:

//Capture screen to bmp file - you could instead capture only a window or use FindObject to get coordinates of a specific object

//run tesseract on the screen grab and output to temporary file
Run>"C:\Program Files (x86)\Tesseract-OCR\tesseract.exe" "%SCRIPT_DIR%\screen.bmp" "%SCRIPT_DIR%\tmp"

//read temporary file into memory and delete it

//Display the text in a message box 

This example simply captures the entire screen. You probably wouldn’t normally want to do this. Instead you could capture a specific window:

//Capture just the Notepad Window
SetFocus>Untitled - Notepad
GetWindowPos>Untitled - Notepad,X1,Y1
GetWindowSize>Untitled - Notepad,w,h

Or even a specific object:

//capture just the editor portion of notepad ... 
SetFocus>Untitled - Notepad
GetWindowHandle>Untitled - Notepad,hWndParent

Either way you then have a screen bitmap you can pass into Tesseract.

Once you’ve retrieved the text you would probably want to parse it, using e.g. RegEx. Here’s an article on a RegEx expression useful for parsing out data.

How to Run an Access Macro from Macro Scheduler

Thursday, August 4th, 2016 by Marcus Tettmar

Recently someone asked in the forums how to “Automatically Detect MS Office Install Location” so that they could run an Access macro.

Well, there are ways to get the path of an installed Office application, but it isn’t necessary in order to run an Access macro. This is a rehash of my forum answer:

You can run an Access macro via the command line using the /x switch. The ExecuteFile command lets you pass parameters. So you could just do this:

ExecuteFile>%USERDOCUMENTS_DIR%\MyDb.accdb,/x Macro1

This will open the DB and run macro “Macro1”. Note my DB is in my documents folder here so I’m just using USERDOCUMENTRS_DIR but this could be any path.

Here’s a list of other command line switches.

For more control you could use VBScript:

  Sub RunMacro(accessfile,macroname)
    dim accessApp
    set accessApp = createObject("Access.Application")
    'comment next line out if you don't want access to be visible
    accessApp.visible = true
    accessApp.DoCmd.RunMacro macroname
    'you can run a subroutine or function in module code instead if you want:
    ' "routinename"
    set accessApp = nothing
  End Sub


This gives you more control – you could make it invisible, and as you can see you could run VBA code instead if you want – or access any of the other methods. Anything you can do inside Access you can do here – by converting VBA to VBScript:

But if you do really want to get the path, how about querying the mime-type in the registry:



  • You are currently browsing the archives for the General category.

      • Archives

    • Categories