June 19, 2014

Automating Facebook and other Web Apps via Zapier

Filed under: Automation — Marcus Tettmar @ 12:09 pm

A while back someone was looking for a way to post from a macro to a facebook page. A few methods were mentioned. There’s another one which is easy and reliable and that is to use Zapier.com. I’ve made a video here to demonstrate how to set it up:

But this demonstrates a lot more potential than just posting stuff to Facebook. Facebook is really just an example. Zapier supports a huge array of other web apps, including help desk systems, CRM systems, email, google docs, popular accounting platforms and a lot more besides. The same principle as used in my video above can be used for those too. So if for example you wanted a macro to create an Invoice in Freshbooks. No problem.

So instead of having to automate the front end of these web apps or spend the time or pay a programmer to work with their API directly, Zapier is a simple solution which sits in the middle. They have a free plan too.

It would also be possible to work the other way and get data OUT of web apps. There are a number of ways to do that including writing to a MySQL database (which Macro Scheduler could read) and saving text/CSV files to a dropbox folder (which Macro Scheduler could read), sending emails (which Macro Scheduler could retrieve) and so forth. Maybe that’s another video.

I’m sure you can come up with some other cool ideas. How about: Running a macro via SMS.

You get a Twilio account with a twilio number. Set up a ZAP which responds to a new SMS sent to your Twilio number and saves a file in a dropbox folder. Have the body of the message saved to the file. You have a macro which is set up on a new file trigger.

So when Macro Schedueler sees a new file in the dropbox folder it runs a macro, which reads the body of the newest file and then parses out the name of the macro it needs to run …

Now you can run macros remotely on your machine from your mobile phone via SMS 🙂

Load Testing – Measuring Elapsed Time

Filed under: Automation, Macro Recorder, Testing — Marcus Tettmar @ 12:02 pm

In a support email recently I was asked how to record a macro to perform load testing.

While you could certainly use the macro recorder for much of the process, in most cases you are probably going to want to insert some code to make the macro more dynamic in waiting for events to complete. Your load testing is going to slow things down and what you want is to measure how long things take. So you’ll need to be sure you’re waiting for “readiness” and calculating how long that took.

The macro recorder by its very nature records the firing time between distinct events like mouse clicks and keystrokes exactly as it happened at play back. It does however insert “WaitWindowOpen” commands when new windows appear and these will be dynamic – they will wait however long is needed for windows to open and close.

But more often than not you’ll want other forms of waiting. My personal recommendation is to use WaitScreenImage to wait for a visual cue on the screen. This is closely analogous to how a human uses the application – she uses her eyes to see what’s on the screen and determine “readiness”.

If you’re load testing then you’re probably going to run lots of macros – or virtual users – at the same time and are going to slow things down. This is exactly what you want to do – you want to see what the effect of adding more users is – and you’ll need to measure elapsed time. So you’ll need the macro to wait exactly as long as necessary.

The easiest way to do that is with Image Recognition. By all means use the macro recorders to record the simple bits – the bits that send keystrokes into fields. Or use the UI functions and the handy Find Object Wizard.

Also use the Screen Image Recognition wizard to record your waits. It’s real easy. Just capture the thing on the screen you want to wait for and it will spit out the code to do that.

So once you’ve done that you have a macro which will carry out the process and wait for things to complete and be ready before continuing. Now you will want to gather statistics to see what the elapsed times are and compare with different scenarios.

You might do this simply by looking at the log file for the macro. The log file outputs the time each command executed. So you could calculate the elapsed time between starting a step and when it completed. I’ve known customers simply open the log files in Excel and add their own formulas.

But I would make use of the Timer function to have the script itself measure the elapsed time of specific events. You might then output this elapsed time to an Excel or CSV file or store it in a database. It’s up to you.

Here’s a simple bit of code which sets a timer, runs Notepad, waits for it’s main window and then calculates elapsed time, storing it in a CSV file.

//start the Timer
Timer>startTime

//Run Notepad as an example
Run>notepad.exe
//wait for it to be ready
WaitWindowOpen>Untitled - Notepad

//How long did that take?
Timer>endTime
Let>elapsed=endTime-startTime

//elapsed is in milliseconds - write it to our CSV file
WriteLn>c:\temp\test_1.csv,wRes,STEP1;%elapsed%

This is really just to show you how the Timer function allows you to measure elapsed time – you’ll likely have a bit more going on and if “readiness” is not signalled by a new window as it is here then WaitScreenImage might be a better option.

June 2, 2014

May 9, 2014

Macro Scheduler 14.1.04 Update – Another Wizard!

Filed under: Announcements — Marcus Tettmar @ 10:03 am

We have today released Macro Scheduler update 14.1.04.

Version History | Trial Downloads | Registered Downloads | New Licenses

This update brings the following new features:

A new IE HTML Element Wizard

This looks very similar to the Find Object Wizard we added in 14.1, but works specifically against HTML elements in IE windows to output IETagEvent functions. Here’s a quick video showing it in action:

This handy feature vastly simplifies the process of figuring out tag names and attributes and in many cases removes the need to trawl through HTML source or use IE’s Developer Tools.

The ability to search the code builders

We’ve added a search box at the top of the Code Builder tree so that you can now search for functions.

The ability to use any custom icons for the system tray

In our last update we finally updated the branding of Macro Scheduler to use our “gearhead” icon. If you’d prefer to use the old icons – or any custom icons you like – you can now do so.

Simply drop two .ico files containing a 16×16 icon into the Macro Scheduler folder called mainicon.ico and runicon.ico. When Macro Scheduler starts it will use mainicon.ico as the default icon in the system tray. When a macro is running it will alternate this with runicon.ico.

We’ve also included the old icons with the installer. After installing Macro Scheduler 14.1.04 you will see a subfolder called “oldicons” in the program folder. Use these if you want the old tray icons.

Version History | Trial Downloads | Registered Downloads | New Licenses

April 29, 2014

Forum Upgrade

Filed under: Announcements — Marcus Tettmar @ 11:57 am

After quite a few years we have finally upgraded the forum software to phpBB3. We had been stuck on an old unsupported phpBB2 release and in the interests of security and future support and maintenance we have now converted the forum to the latest phpBB3 release.

All being well you won’t notice any difference apart from a more modern look and feel. Your logins should still work as before and all your posts are intact. But any problems give us a shout.

There are some useful new features: the built in [code] .. [/code] tags now work without garbling the code and for larger scripts the new forum also now supports attachments. So if needed you can upload .scp files.

The new forums are accessible at http://www.mjtnet.com/forum/ although all old links should still work too.

April 23, 2014

Macro Scheduler 14.1.03 Available

Filed under: Announcements — Marcus Tettmar @ 2:21 pm

We have today shipped maintenance build 14.1.03. Change History Here.

This build mostly fixes a few minor bugs but also has one fairly major change: We’ve replaced the application icons and system tray icon with our “Gearhead” logo ().

Why did we change the icon? Well we love that dude, and he represents what Macro Scheduler is all about!

More importantly, the main reason is consistency. As it stood the software didn’t fit with the brand image exhibited by the web site, which has become a product site pretty much dedicated to Macro Scheduler (I’d like to change the domain name to match but that’s a whole other story involving a lot of risk). It’s possible the old icons caused confusion to those who just downloaded the software from our website. In order to make the flow between website and software installation more seamless it made sense that software and website shared the same brand and therefore used the same logo.

April 15, 2014

Use Case Testimonial: Automating Insurance Policy Cancellations

Filed under: Success Stories — Marcus Tettmar @ 11:59 am

Forum user PaulSR just added this note to our long running thread Tell us how Macro Scheduler helps you, what you use it for in the forums.

We have this week gone live with a Macro Scheduler macro which allows a streamlined, accurate and timeous cancellation process to run within an insurance company. The macro collates data from a Citrix receiver application, opens and polls relevant websites for financial data then populates an Excel spreadsheet and executes some VBA macros there which allow some processing and presentation of a breakdown of figures for customers wishing to cancel a policy. The data is then returned to Macro Scheduler and it performs all the operations necessary to cancel the policy should that be the customers wish.

This was previously performed by multiple personnel as the initial agent was not skilled enough to provide the customer with accurate data at first point of contact but now that is no longer the case. I have been blown away by how empowering Macro Scheduler has been in allowing me to create something which met and exceeded the business requirements.

The macro is now in use on approximately 200 PCs and so far (3 days in) we’ve had no problems with it whatsoever.

We love hearing success stories like that. If you’ve got a story to share please post it to the thread.

April 11, 2014

April 10, 2014