May 14, 2010

Remove Unnecessary Obstacles

Filed under: Automation — Marcus Tettmar @ 10:48 am

When considering how to automate something, it’s often worth thinking about whether or not you can change the process a little first.

An example that often comes up is the need to automate the retrieval and processing of a particular email message. Many people will already have a manual process that involves, not surprisingly, their email client, e.g. Outlook. They’ll have a filter set up that moves the email they want to look at into a specific folder. Then they’ll take each of the emails in that folder in turn and do whatever it is they need to do to them, such as pull out some information and put it in an Excel file or database or something.

The user’s first thought when he decides to automate something like this is to have Macro Scheduler manipulate Microsoft Outlook to find the email and parse it.

That’s all very well, and is certainly achievable but it does add a rather awkward obstacle into the mix that needs to be navigated around: Outlook.

Look at what we actually want to do. We have some form of email that gets sent, and we want to parse it and perform some action based on it. Outlook just happens to be what we are currently using to read that email. We’re using it because we’re human and Outlook was designed for humans. But it isn’t the only way to read email. The email exists quite happily without it. We could use a different email client. Or remove the need for an email client altogether.

Macro Scheduler can retrieve email directly from a POP3 server, download the email messages to files and then process them. So we can remove Outlook – or any other email client – from the process entirely.

“Wait”, I hear you say, “What about my other email? I don’t want Macro Scheduler messing up my Facebook notifications, birthday reminders, blog updates and work emails” (notice the order of priority there). Well, don’t worry about that, there are several options. Macro Scheduler’s POP3 commands can be set to leave emails on the server and we could set the script up to search the downloaded email and look for only the pertinent messages.

But Ideally we have control at the sending end. We could set up a dedicated email account which these emails get sent to. That simplifies selecting which email needs to be processed. If that is not possible what about creating a new email account (it could be a free webmail account if you don’t have control over your own mail server) and then set up your filtering rule in Outlook, or whatever client you normally use, to forward the desired emails to that email account? This means the only emails in that account are the ones Macro Scheduler should process, thus simplifying the script which now needs only to collect all email in the mail box and can delete it afterwards.

Of course you can take this concept of removing obstacles as far as you like and in the most ideal world whatever it is that sends emails and whatever it is you want the information extracted from those emails inserted into would have a more direct form of communication between each other. But the world is not always ideal and we don’t always have control over the entire sequence of events. At least consider removing unnecessary obstacles from the part of the process you do have control over.

Retrieving and parsing email is just one example. The concept of simplifying a process applies elsewhere too. E.g. moving and copying files using Windows Explorer: instead of automating Windows Explorer by sending keystrokes and mouse events, use the built in file handling commands; pulling data out of a database: don’t automate your database query tool’s front end, access the data directly using SQL; Getting data from an Excel file: no need to try and manipulate Excel via user simulation, you can query the data directly; and so on.

When you sit down and automate a manual process some of the steps in that process might be things you can replace or skip altogether.

May 13, 2010

New Software Testing Course Featuring Macro Scheduler

Filed under: Testing — Marcus Tettmar @ 10:11 am

If you’re new to Automated Software Testing or looking to expand your knowledge you wouldn’t go far wrong with Randy Rices’ training courses.

Rice Consulting specialise in software testing training, certification and consulting. Their new Practical Software Test Automation course focuses on the basics of software test automation and expands on those topics to learn some of the deeper issues of test automation. The course includes hands on exercises using Macro Scheduler.

The course is aimed at Software Testers, Test Automators, Developers and Test Managers.

I’m told an e-learning version of the course is also in the works and I’ll let you know more when I hear about it.

May 12, 2010

Version 12 Dialog Stuff

Filed under: Uncategorized — Marcus Tettmar @ 9:09 am

For you dialog old-timers used to the way dialogs work in v11 and earlier I’ve posted a crib sheet for the new system here:

http://www.mjtnet.com/usergroup/viewtopic.php?t=6110

sarver311 has posted an example of a dialog that implements a drill down lookup list and demonstrates some of the new techniques:

http://www.mjtnet.com/usergroup/viewtopic.php?t=6161

If you have any nice dialog examples or tricks you wish to share please post them to the beta forum.

JRL points out that since Macro Scheduler is built with Delphi most of the dialog objects and properties are inherited from Delphi so for more detailed information about them the Delphi documentation can be consulted:

http://www.mjtnet.com/usergroup/viewtopic.php?t=6162

May 11, 2010

Macro Scheduler 12 Beta Updates

Filed under: Uncategorized — Marcus Tettmar @ 3:34 pm

Just a quick reminder that you can keep up to date with beta builds at the beta forum. The latest build is 028. So if you have an earlier build you should download now from the registered user area.

Everything seems to be going quite well and all being well we should now be in a position to release v12 by the end of May.

May 7, 2010

Run All Macros in a Folder/Group

Filed under: Automation, Scripting — Marcus Tettmar @ 3:26 pm

Someone asked me today how to run all macros found in a folder. This simple script will run all macros it finds in its own folder in turn:

GetFileList>%SCRIPT_DIR%\*.scp,MacroFiles
Separate>MacroFiles,;,Macros
If>Macros_count>0
  Let>k=0
  Repeat>k
    Let>k=k+1
    Let>this_macro=Macros_%k%
    If>this_macro<>SCRIPT_FILE
      Macro>this_macro
    Endif
  Until>k=Macros_count
Endif

Note the check to make sure it doesn’t run itself!

This could be useful where you want a quick way to schedule a series of macros. Schedule this script and then all you need to do to add another to the schedule is to drop it into the same folder (or macro group).

For a bit more control consider naming each macro with a numeric prefix and then sort the array to determine the order in which they are run. Version 12 (currently in beta) has a built in ArraySort function. Or use this QuickSort algorithm.

April 26, 2010

Windows Version Trends

Filed under: Windows 7 — Marcus Tettmar @ 10:57 am

I’ve just downloaded Windows version usage data from StatCounter and charted it in Excel, adding polynomial trend lines. Here are the results:

wintrends

If this is right Windows 7 usage will eclipse that of XP by the end of this year. But I’m no statistician so don’t hold me to that.

Either way, I understand that a lot of companies chose to skip Windows Vista and are now going straight to Windows 7. Now is definitely the time to make sure your macros run on Windows 7 if you haven’t already.

April 23, 2010

Using an Old Version? Time to Upgrade for Vista/Win7 Support.

Filed under: General, Macro Recorder — Marcus Tettmar @ 9:50 am

If you’re using an old version of Macro Scheduler, especially version 8 or lower, and like many others, you or your company are considering upgrading your Windows operating system to Vista or Windows 7 soon then you will need to consider upgrading Macro Scheduler too.

Windows 7 adoption rates are outpacing those of Vista fast and many companies are planning on going straight from XP to Windows 7. Already Windows 7 has over 15% market share with over 90 million licenses sold as of March 2nd.

Version 8 of Macro Scheduler was superseded before Windows Vista came along. And Vista brought with it some changes that required us to make changes to Macro Scheduler. So Macro Scheduler v9 was the first version that fully supported Vista. The latest version supports Vista and Windows 7 fully and is listed at Microsoft.com as a “Windows 7 Front Runner” application.

One of the things that Vista introduced were the thumbnail windows that appear when you hover over a task bar icon. These have the same title as the application’s main window. So in Macro Scheduler 8.0 and lower you will run into a problem where your SetFocus lines and other window functions find this thumbnail window before the main window and prevent your scripts from working properly.

Starting with Macro Scheduler 9.0 (in 2007) we made the window functions ignore these new thumbnail windows to prevent this problem. We also had to make some changes to the macro recorder. Older versions may not be able to record under Vista without running Macro Scheduler as admin.

So if you’re still running Macro Scheduler 8 or below then even if you have no plans to change your macros, you’re going to need a newer version when your operating system is upgraded to Windows 7.

Furthermore, we can’t support old versions forever and with the release of version 12 we will be discontinuing support for versions 8 and lower. Since version 9.0 was the first version that properly supported Vista and above we can only really continue to provide support for this version and onwards.

Version 12 offers even more Vista/7 functionality including a reliable AutoLogon mechanism that works in Vista/7/2008 to allow you to schedule macros to run even when Windows is locked or logged out.

So now is the time to upgrade. And if you buy or upgrade to v11 now, we’ll give you a free upgrade to v12 when it is released in a few weeks.

So there’s really no need to wait.

For a summary of new features in v12 click here and here.

The best way to upgrade is to log into your registered account and click the upgrade links. Any problems accessing your account email us.

Consider adding maintenance to your order as well. This will ensure you continue to get all future upgrades and new features automatically at no extra cost. Maintenance is the easiest way to ensure your software stays up to date with all the new Windows releases.

Take a look at the Macro Scheduler history list to see how many improvements there have been since version 8:
http://www.mjtnet.com/mswhatsnew.htm

April 20, 2010

April 19, 2010

Macro Scheduler 12 Beta Available

Filed under: Announcements — Marcus Tettmar @ 12:33 pm

Having gone through a period of closed beta testing Macro Scheduler 12 Beta is now available to all registered customers. All registered users can log into their account and download the beta now.

Just a summary of some of the main new features:

  • Faster and more powerful custom dialogs with real time event handlers; improved Dialog Designer with access to more object properties.
  • Scripting Enhancements including: Native Excel functions, more string functions, local scope support, array functions, regular expression window matching for all window functions, improved image recognition and a new loop construct.
  • Multi-tabbed editing plus more editing features such as: remember code folding state, jump to subroutines, open files in new tab, integration with WebRecorder.
  • Debugger improvements: Variable value debugger breakpoints; search the watch list.
  • The ability to move and re-order macro groups, create linked groups for easier collaboration and point to other macro profiles. Import macros by dragging and dropping files onto Macro Scheduler.
  • AutoLogon for Vista/Windows 7 – schedule macros to run even when Windows is locked or logged out.
  • Custom Triggers: Create any kind of schedule trigger using MacroScript code.
  • Script Templates: Create new macros using supplied code or make your own templates.

This is just a summary. You’ll find a fuller list and release notes here. Please read the release notes before installing.

Please help test this version and report any issues to the Macro Scheduler Beta forum.

Questions:

When will the beta expire? The beta expires 30th June 2010.

So, when will Macro Scheduler 12 be released? All being well beginning of June 2010, possibly sooner.

And how much will it cost? Those with a valid maintenance plan will get v12 at no additional cost. Otherwise you will need to purchase an upgrade. Current upgrade prices can be viewed on our upgrade page. There are no plans to change these prices at this stage. If you have v11 but don’t have maintenance you can purchase it by logging into your account.

March 26, 2010

Coming Soon – Macro Scheduler 12

Filed under: Announcements — Marcus Tettmar @ 1:40 pm

box_done_12If you’re wondering why I’ve been so quiet of late it’s largely because we’ve been working flat out on putting the finishing touches to Macro Scheduler 12. A small group of beta testers are giving it a good workout right now and we should soon be able to open beta testing up to registered users, with a view to release in early June.

Here’s a quick round up of what exciting changes you can expect.

Faster and More Powerful Custom Dialogs; Improved Dialog Designer

The biggest change to Macro Scheduler is regarding Custom Dialogs. We’ve completely re-engineered the way custom dialogs work to give you access to more object properties while also improving responsiveness. We’ve added real-time event handlers so you can respond immediately to button clicks and other object events without the need for cumbersome “action loops”. You can get and set object properties immediately at any time. A new property editor in the Dialog Designer gives you access to all available properties and a visual menu designer means there’s no need to edit any code inside a dialog block.

So if you’re one of those people using Macro Scheduler to create user interfaces you’ll find you can customise your dialogs a lot more and make your dialogs much more responsive. Even if you only create the odd simple dialog you’ll find the new system is simpler.

  • More properties
  • More responsive
  • Real time object event handlers (e.g. button OnClick)
  • Enhanced property editor
  • Visual Menu Designer

Scripting Enhancements

But if you don’t care about Custom Dialogs there are many more scripting improvements. Version 12 offers an option to give variables local scope. We’ve added native Excel functions, process functions, array functions, more string functions, improved the screen image recognition functions, added 64 bit registry support, added RegEx support to window functions, and added system tray functions. We’ve addressed some issues sending keystrokes to old 16 bit apps and Citrix applications. A new loop construct has been added: While/EndWhile.

  • Local Scope
  • Native Excel Functions
  • Process Handling Functions
  • ArrayCount and ArraySort Functions
  • More String Functions
  • Improved Image Recognition Functions
  • 64 Bit Registry Support
  • System Tray Functions
  • RegEx Window Title Matching
  • While/EndWhile Loop Construct

Multi-Tabbed Editing

We’ve made even more improvements to the editor. We’ve added editor tabs so you can now open more than one script at once! Right click on a filename anywhere in your code (e.g. in an Include or Macro line) and open it in another tab. You can right click on a subroutine name – in a GoSub statement for example – to have the cursor placed on the corresponding Subroutine line. Variable breakpoints allow you to set debug breakpoints based on variable values. We’ve added a search bar to the watch list so you can find variables quickly. Code folding is now remembered between sessions. Better integration with WebRecorder: A button launches WebRecorder and outputs the code you record into your macro.

  • Multi-Tabbed Editing
  • Variable Breakpoints
  • Remembered Cold Folding
  • Open Files From Code
  • Jump to Subroutines
  • Integration with WebRecorder
  • Variable Search

Reorder Groups; Share Macros; Templates

In the main Macro Scheduler window v12 allows you to move and re-order groups using drag and drop. Quickly import macros by dragging .scp files from Windows Explorer into Macro Scheduler. Linked Groups allow you to share macros with colleagues by linking a group to a network folder and have new macros in that folder show up automatically. Quickly create a new macro from an existing one by right clicking and selecting “Duplicate to New Macro”. We’ve added templates. “File/New From Template” allows you to create a new macro from an existing .scp file.

  • Drag and drop macros
  • Duplicate macros
  • Share macros with Linked Groups
  • Resort/Reorder Groups via Drag and Drop
  • Templates

AutoLogon for Vista/Windows 7
Reliable AutoLogon for Vista/Windows 7/Windows 2008. Specify a username and password in macro properties and if Windows is locked or logged out when the macro is scheduled AutoLogon will log in to Windows, run the macro and then log out again. Note, we’re discontinuing AutoLogon support for XP which was problematic. Vista/Windows7/Windows 2008 offers a much safer, more reliable mechanism for performing an AutoLogon.

And that’s not all. Watch this space for updates.

Keeping Your Software up to Date – Get a Free Update
If you’re thinking about purchasing Macro Scheduler don’t hold off. If you purchase v11 now you’ll get a free update to v12 when it is released in a few months. If you have a maintenance plan, make sure it is up to date.