January 23, 2008

Macro Scheduler in PC Plus Magazine

Filed under: General — Marcus Tettmar @ 4:20 pm

If you’re in the UK watch out for next month’s issue of PC Plus magazine (issue number 266). A full, unrestricted, licensed, copy of Macro Scheduler 8.0 will be on the cover disc. And inside you’ll find a discount code for version 10 – the latest and greatest.

Macro Scheduler on New Software Deal of the Day Site

Filed under: General — Marcus Tettmar @ 3:51 pm

There’s a new Software Deal of the Day site about town. It is called, appropriately enough, Software Deal of the Day and it can be found at www.software-dod.com.

Each day the site features a different software title with a juicy big one-day-only discount. Unlike other similar sites they also offer a “Second Chance Discount” after the software has been featured.

Macro Scheduler will be offered on Software Deal of the Day on February 4th. So if you haven’t got a copy of Macro Scheduler yet, keep your eyes peeled for the one-day discount.

January 22, 2008

January 20, 2008

New Release – James Isaac

Filed under: Announcements, General — Marcus Tettmar @ 9:38 pm

James Isaac Tettmar James Isaac Tettmar was born Friday 18th January at 0938 GMT. Mother and baby both well. A great start to the year! 🙂

January 17, 2008

Could Automation Save the Economy?

Filed under: Automation, General — Marcus Tettmar @ 1:14 pm

The editorial comment in the latest issue of Computing magazine discusses how IT may hold the key to preventing a recession:

“Financial institutions are looking for IT-enabled efficiency to help them through a sticky patch”

Regular Macro Scheduler users don’t need to be told how much automation can boost productivity and increase efficiency. Just look at how Iowa Laser have made efficiency savings of $75,000 every year since introducing Macro Scheduler to help streamline many important business processes.

In difficult economic times firms need to cut costs, become more efficient and more productive. By automating more of their business processes they can improve reliability and free up important resource to concentrate on their bottom line and become more competitive.

January 3, 2008

Screen Scrape Text Capture Example

Filed under: Automation, Scripting — Marcus Tettmar @ 6:59 pm

In this post I discussed the Text Capture commands and explained what kind of text can be captured.

To try out the text capture functionality launch the latest version of Macro Scheduler. Click New to create a new script and then in the Code Builder locate the “Text Capture Wizard”. Point the mouse at some text while holding the Shift key down.

You can see a video of this in action here.

This Wizard will let you determine whether or not the text you want to capture can be captured with the Text Capture commands. If it is not revealed when you move the mouse over it while holding Shift down then it must not be generated by Windows text out functions. See my previous post for an explanation.

December 31, 2007

Macro Scheduler 10 Has Shipped

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

I am pleased to announce that Macro Scheduler 10 is now available. If you’ve been keeping an eye on my blog or the forums you’ll probably already know about some of the great new features in this version:

  • Faster, near-instant screen image recognition
  • Powerful, easy-to-use, screen text capture commands – capture almost any text from the screen!
  • Improved debugger and error reporting to simplify problem resolution
  • Improved code builder to make macro creation easier
  • More hot keys
  • New script commands
  • Many other fixes and improvements
  • For full change list see: Macro Scheduler v10 Release Notes

    Buy Now | Buy Upgrade | Download | Registered Downloads

    December 12, 2007

    Capturing Screen Text

    Filed under: Automation, Scripting — Marcus Tettmar @ 10:37 am

    As I have mentioned previously, Macro Scheduler 10 introduces some powerful new commands for capturing screen text. In this post I aim to explain what kinds of text can be captured with these new commands and why there will always be some text that cannot be retrieved.

    First let’s look at how the existing functions, GetWindowText and GetObjectText work in Macro Scheduler 9.x and below.

    Open up Macro Scheduler and click on the Tools menu and then the “View System Windows” option. You’ll end up with a window that looks something like this:

    visw.gif

    What we are looking at is a tree representation of windows open on the system. In the above screen shot the highlighted line is showing us an object of class “Button” with caption “Test Center”. Each line gives us the current handle of the object, followed by its class name and then its caption text, if any.

    This caption text belonging to an object is made available to other processes – it is published if you will. An app can simply ask the control for its text by sending a simple message to it. That is what Macro Scheduler is doing when it builds this list of windows and objects. Macro Scheduler enumerates all top level windows and then for each one enumerates each of its child “windows”. Note that I use the term window interchangeably with object or control here – the controls that appear in the list are “windowed controls” – they have window handles. A handle allows us to interact with the control. If we know its handle we can send a message to it saying “please give me your text”. And so we get the text of the control back. This is what GetObjectText and GetWindowText do.

    There are a number of shortfalls to this approach. One is that the “caption text” that the object publishes is not always the text that you see on the screen. In the case of standard Buttons, Edits, Windows and Checkboxes the published text is usually what you see. But other objects don’t necessarily work the same way. We usually know where we are with common controls – ones that belong to Windows, but custom controls in third party software may not follow the same rules. And a treeview’s caption, for example, is not the text belonging to all its nodes which is written to the screen. Furthermore not all text belongs to windowed controls. In Delphi applications, a control class called TLabel is commonly used as a way to write text on a window. These are often used to label other controls like edit boxes. But TLabels are not windowed controls – they don’t have handles. So this technique will not be able to retrieve their text.

    We also can’t use this approach to get text from the likes of Word documents or Internet Explorer pages. This text is not just some simple caption property belonging to an ordinary control – it is created in a more direct way.

    When Windows writes text to the screen it uses one of a number of functions deep within the Windows API. Most Windows applications will trigger these functions whether or not the programmer realises it. One such function is TextOut:

    Windows GDI – TextOut
    The TextOut function writes a character string at the specified location, using the currently selected font, background color, and text color.

    Note that this function is part of gdi32 which is responsible for graphics – GDI = Graphics Device Interface. So TextOut is being called to “paint” a character to the screen.

    With Macro Scheduler 10, when you call one of the new text capture commands Macro Scheduler uses a “hook” to listen in to calls to TextOut and other similar functions. It is therefore able to intercept what is written to the screen and retrieve the text output by a window.

    This works with all kinds of applications including Microsoft Office, Internet Explorer, Firefox and the vast majority of everything else. There are still some exceptions though. Remember that this works by hooking these low level functions within Windows that are used to create text. The vast majority of Windows applications will use these system calls (often indirectly). However, some software may not. There’s no reason why a programmer can’t write text in an even lower level way – he might decide to paint a word pixel by pixel.

    As an example – Java applications written with the AWT or SWT frameworks write text using Windows API functions. So we can detect text from those. But if you have a Java app produced with the Swing libraries, which handle text output their own way, you’re not going to be able to capture the text from it.

    Finally, what about text on images? Well, text on an image was already there. It was painted by the artist. It is set in stone. So text that appears in a jpg, bmp or any other image file, cannot be detected with the new text capture commands, because it isn’t produced on the fly by one of Windows own text output functions.

    The best way to determine whether or not the text you are seeing can be captured with the new text capture commands is to fire up the “Text Capture” sample macro. This will show you the text beneath your mouse cursor. So move the mouse over the text you are interested in and see if it gets displayed in the dialog. If it is, you know you can use the text capture commands to retrieve this text in your macro.

    The only way to detect text that cannot be detected with the text capture commands is via OCR. Two methods to do this in Macro Scheduler are discussed here and here.

    December 11, 2007

    Kudos to McAfee

    Filed under: General — Marcus Tettmar @ 2:49 pm

    A few days ago one of our customers reported an issue while trying to install msNet – Macro Scheduler Remote Controller. During install their virus scanner reported a virus in one of the files. I was quite sure it was a false positive as we check all our distributions with two well known anti-virus products. I also uploaded this file to VirusTotal which scanned it against 30 anti-virus products and all reported it as clean. But this didn’t help our customer who couldn’t install the software. So I asked for details of the anti-virus product being used, which I received yesterday evening. They were running McAfee’s enterprise product with the latest scanner engine and definitions updates.

    So at 10:15 last night I emailed this information to McAfee’s vendor support address along with a link for them to download msNet from. This morning there was an email waiting in my in box from McAfee labs. It was received at 2359 last night – less than two hours after I had emailed them. They said that they had identified and fixed the issue, gave me an updated dat file and stated that the fix would be in their live definitions update today! Nice.

    November 27, 2007