Home of Macro Scheduler - Macro Tools and Automation Software
If your email software garbles this newsletter, read this issue at mjtnet.com.

Macro Scheduler — July 2010 Newsletter

Macro Scheduler 12.0.5 Update
Practical Software Test Automation Course Now Available in e-Learning!
Associating a File Extension with a Compiled Macro
Success Story: Automated Information Retrieval and Report Production
Forum Roundup
Staying in Touch

Macro Scheduler 12.0.5 Update

Macro Scheduler 12.0.5 is now available with the following fixes:

  • Fixed: PNG images added to custom dialogs not saving correctly and therefore not displaying when dialog opened or script run.
  • Fixed: LClick and RClick not independent of left hand/right hand mouse settings (LCLick should always do primary button function).
  • Fixed: GetDialogProperty not retrieving properties of parent dialog itself (when object name ommitted).
  • Fixed: “The procedure entry point WTSUnRegisterSessionNotification could not be located in the dynamic link library wtsapi32.dll.” under Windows 2000.
  • Fixed: Macro Recorder failing to properly record window titles containing a colon character.
  • Fixed: Error messages in compiled scripts showing garbage instead of file name.

Workflow Designer and the SDK have also been updated to the same MacroScript version.

Registered Downloads/Upgrades | Evaluation Downloads | New License Sales

Practical Software Test Automation Course Now Available in e-Learning!

Rice Consulting have just announced that their new Practical Software Test Automation Course – which features Macro Scheduler for the scripting exercises – is now available in an e-Learning format.

This course focuses on the basics of software test automation and expands on those topics to learn some of the deeper issues of test automation. This course is not specific to any particular tool set but does include hands-on exercises using free and inexpensive test tools. The tool used for test automation exercises is Macro Scheduler.

The main objective of this course is to help you understand the landscape of software test automation and how to make test automation a reality in your organization. You will learn the top challenges of test automation and which approaches are the best ones for your situation, how to establish your own test automation organization, and how to design software with test automation in mind. You will also learn many of the lessons of test automation by performing exercises using sample test automation tools on sample applications.

I’ve been running through the course myself and so far I’m really impressed. This is a great way to get started on test automation and the great value e-Learning format means you can do it in your own time at your convenience. There’s also a whole module on using Macro Scheduler with some videos to help you get started.

You can see the course outline here, take a demo, or sign up on line here.

If you prefer to learn in a classroom and can get to the Dallas/Ft. Worth area, Randy will be holding a workshop there on August 12/13. More details are here.

Associating a File Extension with a Compiled Macro

I have a few scripts which perform actions on files. Rather than have the script ask me what file to use, it is easier to associate the file type with the script so that I can just double click on the file (or right click and choose “Open with”) in Windows Explorer.

For this to work the script must first accept a file on the command line. Here’s a really simple script which reads the content of a file passed into the script with the “thefile” command line parameter:

ReadFile>%thefile%,fdata
MessageModal>fdata

If you were to compile this script and then pass thefile on the command line it would read in the file content and display it in a message box:

c:\path\myexe.exe /thefile=c:\somefile.mjt

Now, if we create a file association for .mjt files we would only need to double click on the .mjt file to have it open in the exe.

The easiest way to create a file association for a file that does not already have one is to just double click on the file in Windows Explorer. Then when asked choose to select from a list of installed programs and on the next dialog click on the “Browse” button to locate your executable.

If the file extension is already associated with other applications then right click on the file and choose “Open With” and then “Choose program…”, then UNCHECK “Always use the selected program to open this kind of file” and click on “Browse” to locate your executable.

Initially this won’t quite work. We need to make a small change, as this creates a mapping in the registry which looks like this:

“c:\path\myexe.exe” “%1″

We want to change it to:

“c:\path\myexe.exe” /thefile=”%1″

So after creating the file association via Windows Explorer we need to make a small registry change:

1. Fire up RegEdit.exe (Start/Run and then type regedit.exe)
2. Open HKEY_CLASSES_ROOT
3. Search for your exe name to find the “c:\path\myexe.exe” “%1″ entry
4. Make the change as above, changing the “%1″ to /thefile=”%1″

Now, when you double click the file (or right click/Open with) it will launch your exe, with the filename passed to it in the “thefile” parameter.

You could actually code the script in such a way that you don’t need to do the registry change. You could parse the COMMAND_LINE system variable to get the file from the command line, without requiring a custom parameter name. This is discussed in this forum post which talks about being able to drag and drop a file onto a script.

If you want to create the file association programmatically, take a look at what registry entries are created by Windows when you do it manually. Then you can use the registry functions to achieve the same. E.g. this script associates .why files with the “c:\where\why.exe” executable expecting the file in a parameter called “thefile”:

RegistryWriteKey>HKEY_CLASSES_ROOT,.why,,why_auto_file
RegistryWriteKey>HKEY_CLASSES_ROOT,why_auto_file\shell\open\command,,"c:\where\why.exe" /thefile="%1"

Success Story: Automated Information Retrieval and Report Production

This was posted to the forum recently and I thought I would share:

I’m currently using [Macro Scheduler] to pull aviation electronic manufacturing information from a SAP database, compile into a MS Access database, then generate a report such that the data becomes useful information needed to identify and prioritize manufacturing tasks and processes across a diverse profile of complex systems being manufactured.

Had to spend hour+ (heavy on the +) every day spread out throughout an entire shift getting this information manually. Often, due to the length of time to acquire the info, the information would be derived too late in the shift to make good use of it. Lost opportunities and manufacturing delays galore.

The information can now be gleaned by anyone within minutes. The entire department is empowered to work smarter through making use of accurate real-time visual status information. Status is no longer hidden or obscure to visualize.

I was able to understand and adapt to the very easy to use Macro Scheduler structure with little frustration. I found that things I tried actually worked as anticipated and worked far more reliably than I dared hope for. When stuck, I found EXACTLY what information I needed in your forums. In fact, I ecstatically found differing superior methods in other areas of interest while searching for these solutions.

I haven�t had this much fun in decades. I want to thank the crew @ mjtnet and the users of Macro Scheduler for the efforts that brought enlightenment to me of a better way to do things.

Share YOUR story – what do you use Macro Scheduler for and how does it benefit you?

Forum Roundup

A selection of some recent forum posts:

How to draw a rectangle on the screen

Determine number of days in each month of the year

Retrieve the date/time from the web

Automating listview selections

Using XLSetCell (and documentation fixed in 12.0.4)

Reading files stored on google documents

How to get yesterday's date

Capture URL from address bar of Internet Explorer

Find and execute oldest file in a directory

Using MODI OCR to click on text (updated)

Staying in Touch

There are a number of ways of getting in touch with us. For support there's the forums and our help desk. It should be noted that the forums are primarily for peer-to-peer discussion and while I try my best to monitor new posts I may sometimes miss some. In contrast our help desk is monitored continuously and every ticket gets a response.

Feel free to reply to this email if you wish to contact me personally, and I'll do my best to answer, but this mail box does tend to get jammed up with out of office responses and other bounces. So if I miss your email I apologise. If you don't get a response, it's nothing personal - drop me a line via the help desk instead. I can't always be available, but there will always be someone on the support desk.

You can also follow me on twitter: http://twitter.com/marcustettmar

You are receiving this message because you have purchased Macro Scheduler or related software from MJT Net Ltd or have opted to receive news and announcements by subscribing at mjtnet.com. To stop receiving messages from MJT Net Ltd please click here to unsubscribe. You may prefer to subscribe to my RSS feed.