November 11, 2008

November 6, 2008

New Forum for Software Testing

Filed under: Announcements, Testing — Marcus Tettmar @ 5:32 pm

I have created a new forum dedicated to using Macro Scheduler for Automated Software Testing. So if you are using Macro Scheduler for software testing, please head on over and introduce yourself, post about your experiences and share any tips you might have.

Language Packs

Filed under: Announcements — Marcus Tettmar @ 3:20 pm

Good news: The system used for localizing Macro Scheduler has been updated to work with version 11. I had thought we would need to ditch the current system and replace it with another which would have meant the existing translations would have had to be recreated. But now that we can continue to use the same system the existing language packs will continue to work with v11 and the translators will only need to translate a handful of new strings. I have updated the beta release notes.

November 5, 2008

November 4, 2008

Windows 7

Filed under: General — Marcus Tettmar @ 9:19 am

Microsoft have just made the Windows 7 Developer Guide available. It’s more of an overview of the new features with a few screen-shots thrown in. But most importantly Microsoft states that Windows 7 is designed to be compatible with applications and drivers built for Windows Vista. So the good news is Macro Scheduler, which has the Works with Vista logo, should continue to run on Windows 7 without modification. Of course as soon as the Windows 7 beta is made available to MSDN subscribers we’ll be testing it out for sure.

November 3, 2008

October 31, 2008

Macro Scheduler Beta 11 Build 017 Available

Filed under: Announcements — Marcus Tettmar @ 5:29 pm

Build 017 has just been made available with the following fixes since the previous build:

– Fixed: News Feed only retrieving from cache until Macro Scheduler restarted
– Fixed: Issue with -NOSYSTRAY

Download from Registered Downloads page.

Asynchronous Processes

Filed under: Automation, Scripting — Marcus Tettmar @ 12:05 pm

The other day a customer had a problem. He wanted to use this VBScript code to trigger macros in Microsoft Excel workbooks. The trouble is that his company’s Excel security settings are set so that macros in non-signed Excel workbooks pop up a warning dialog.

http://www.mjtnet.com/images/xlwarn.jpg

The customer has to click a button to enable macros (or press the ‘E’ key). This dialog holds up the VBScript code until the button is clicked.

He didn’t want to have to digitally sign every single workbook and he wasn’t allowed to change the security settings.

Now, with regular Macro Scheduler code you could start Excel and send keystrokes to it to run the macro and therefore you could have the script send keystrokes to the warning dialog. But if you are using Excel’s ActiveX interface to run the macro via VBScript, the VBScript gets held up by that dialog.

The solution is to use an “asynchronous process” which does nothing but waits for the dialog to appear and then hits the button (sends the ‘E’ key). This process is launched just before the VBScript code that runs the macro is called. Then, although the main script is held up, the other script can cancel the warning, allowing the main script to continue.

We can do this by creating another macro and compiling it to an executable:

WaitWindowOpen>Security Warning
Wait>0.5
Press ALT
Send>e
Release ALT

We compile that code to an executable and then have our main script launch it – without waiting for it to complete – before calling the VBScript code:

VBSTART
Sub RunXLMacro(xlfile,macro)
  Dim xlApp
  Dim xlBook

  Set xlApp = CreateObject("Excel.Application")
  Set xlBook = xlApp.Workbooks.Open(xlfile)

  xlApp.visible = True
  xlApp.Run macro

  xlApp.Quit
  Set xlBook = Nothing
Set xlApp = Nothing
End Sub
VBEND

//Launch the dialog cancel process
Run>%SCRIPT_DIR%\ClearWarning.exe -HIDE -NOSYSTRAY

VBRun>RunXLMacro,C:\Documents\MyWorkBook.xls,SampleMacro

Another way to do this would be to use Macro Scheduler’s Triggers. Instead of writing and launching a second macro, just create another macro and under Macro Properties specify a Window Open trigger. This macro would then detect the warning dialog and clear it. But some benefits of the second “asynchronous” macro process are that you only run it when you need it (you might WANT to have to manually clear the warning dialog when using Excel manually) and it is also portable – you can use this technique with compiled macros that you distribute, and Macro Scheduler does not need to be installed.

Now, as stated earlier, we could have coded the whole thing – open Excel and launch the macro – using regular Macro Scheduler code and sending keystrokes, instead of using VBScript, therefore avoiding the problem. But VBScript is a nice way to run Excel macros, and I’m sure there are other scenarios where the “asynchronous process” technique may be useful.

October 29, 2008

End of Support for Windows 98

Filed under: Announcements, General — Marcus Tettmar @ 11:36 am

With Macro Scheduler 11 we will no longer support Windows 98. Macro Scheduler 11 will not install or run on Windows 95, Me or 98. There are a number of reasons for this, one of which is full Unicode support. Already some of the script commands cannot be used on Windows 98 because they make use of operating system features that did not exist back then. Furthermore, Microsoft stopped supporting Windows 98 in July 2006.

If you need to run macros on Windows 98 you can continue to use version 10.

Macro Scheduler 11 has been tested on Windows 2000, Windows XP (x86 and x64), Windows 2003 Server (x86 and x64), Windows 2008 Server (x86 and x64) and Windows Vista (x86 and x64).

October 28, 2008

Beginner’s Guide Video

Filed under: Announcements, General — Marcus Tettmar @ 4:24 pm

I’ve made a short video version of the beginner’s guide to scripting from the Macro Scheduler help file. It’s basically me running through the tutorial, or a close version of it. So for those who prefer to watch videos than read help files, check it out here. It’s just me. A little rough and ready, but I hope it’s clear enough.