May 3, 2007

Celebrations All Round

Filed under: General — Marcus Tettmar @ 7:53 am

So a day after celebrating our 10th anniversary I’m pleased to also congratulate Nagarsoft on their 1st year in business. Nagarsoft have achieved much in their first year, with the launch of their superbly crafted Direct Access:

Direct Access speeds up your personal computing experience by reducing time consuming, repetitive tasks through the use of abbreviations. Type an abbreviation in any application and Direct Access will detect it and perform the task you desire.

And by the way – Macro Scheduler customers can get 25% off Direct Access. You’ll see details when you log in to the registered download area.

Here’s wishing Andrea at Nagarsoft many more years in business. I look forward to being able to celebrate his company’s 10 year anniversary with our 20th!

May 1, 2007

Macro Scheduler 10 Year Anniversary Offer on Bits du Jour!

Filed under: Announcements, General — Marcus Tettmar @ 12:01 am

Today, 1st May 2007, Macro Scheduler is on sale at Bits du Jour.

Ten years ago on 1st May 1997 we sold our very first copy of Macro Scheduler. Back then there was only one edition of Macro Scheduler and it sold for just $40. Today, for one day only, you can buy the latest version of Macro Scheduler Standard for the same price! That’s a huge discount of 58%! And the discount is valid for Professional and Enterprise versions too.

58% Off Macro Scheduler Today Only

Get your discounted copy now – use coupon code BDJ10YR.

The mathematically astute amongst you may have noticed that the discount is actually 58.76%. That is the percentage needed to get the price of Macro Scheduler Standard down to an even $40 – the price in May 1997!

Thanks to Andrea Nagar of Nagarsoft for the banner!

April 30, 2007

Macro Scheduler 9.1 Released

Filed under: Announcements — Marcus Tettmar @ 8:41 am

Coinciding nicely with our 10 year anniversary, Macro Scheduler 9.1 was released today. I guess version 10 would be a more apt label, but this is not a major release – more a maintenance update with a few bonus extras thrown in:

Fixes:

  • Possibly fixed random “Cannot open Clipboard” errors
  • Fixed an issue with dialog designer toolbar button in editor sometimes getting invalid content
  • Select All (CTRL+A) now works in dialog memo fields
  • Fixed CTRL-A (Select All) in Code Snippets editor
  • Fixed WaitWindowOpen/Closed to work with handles as per docs (WIN_USEHANDLE)
  • New stuff:

  • Ability to include bitmap data for dialog images and buttons in scripts
  • Script now creates object handle variables: DialogName.Handle, DialogName.ObjectName.Handle after Dialog block is executed
  • Added DIALOG_CHANGE OnEvent handler:
    OnEvent>DIALOG_CHANGE,DialogName,ObjectName,Subroutine
  • Dialog Designer toolbar button in editor will now edit dialog if cursor on first line of a dialog block
  • Improved RetrievePOP3 to decode attachments and output body text parts.
  • Deleting macros will now delete to recycle bin
  • Being able to include dialog bitmap data inside scripts instead of referring to external image files will make it easier to distribute compiled dialog macros (yes, I know how much one or two of you have wanted this!). The new DIALOG_CHANGE event will also make life easier when writing scripts that need to respond to the user making selection changes on dialogs. And having the object handles exposed as soon as the dialog is created will reduce code complexity for working with API functions that manipulate the objects directly. So I think those of you who use Macro Scheduler to build distributable solutions with their own user interfaces will appreciate this release.

    Trial Download | Registered Downloads

    April 2, 2007

    Macro Scheduler Saves the World 27,000 Years!

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

    In case you didn’t already know it, Macro Scheduler will be 10 years old this year. In fact, I had a quick look through our old sales records the other day and discovered that we sold the first ever copy of Macro Scheduler on 1st May 1997. So 1st May this year will be a special day. We’ve got a few things up our sleeves so keep posted for more news.

    In the mean time Andy Brice, of PerfectTablePlan.com, suggested it might be fun to work out how much time Macro Scheduler has saved people in total since its launch in 1997. So we pulled some figures from our sales database, made a few conservative estimates, consulted our marketing people and ran a few number crunching macros and discovered that in total Macro Scheduler has saved approximately 27,000 years in lost productivity over the last 10 years.

    In that time you could have built:

    • 6875 Golden Gate Bridges, or
    • 3928 Channel Tunnels, or
    • 5500 Wembley Stadiums, or
    • 1350 Great Pyramids of Giza.

    [Although to be fair Herodotus estimated you’d need 100,000 workers to build the Giza Pyramids in 20 years]

    Seriously. Sure, we had to make a few estimates but we’ve been conservative. This is based on our most complete year on year user-base figures and an assumption that on average each user saves 2 hours per working day. We’ve assumed a working day is 8 hours and a working year is 210 days. While some people may use the software on a more ad-hoc basis we know many run dedicated Macro Scheduler workstations running 24 hours a day. Anyway, we need something to work from, so we’ve chosen an average figure of 2 hours per day. But even if you halve that it’s still a pretty impressive outcome. And it could be more – that’s only working days and our user base figures most likely under-read due to various custom licensing arrangements and unlimited user licenses etc.

    Hey, it’s just a bit of fun 🙂

    March 14, 2007

    Hijacking Spammer

    Filed under: General — Marcus Tettmar @ 8:00 am

    Some dirty little spammer appears to have used valid mjtnet.com email addresses for the reply-to address of a recent spamming campaign. We’re getting dozens of mail failures for emails we didn’t send out, many of which are advertising a certain men’s pharmaceutical product. Nothing to do with us.

    What can be done? Not a lot. We already have SPF records set up for our domain. SPF defines which mail servers are allowed to send mail for a specific domain. Unfortunately the vast majority of mail servers don’t bother to do SPF checks. Any that do will be rejecting those spam messages as they were sent from a different mail server to the one our domain permits to be used. But most won’t.

    So I guess all we can do is wait for this to die down, filter out the mail failures and hope that this recent hijacking doesn’t get us unfairly blacklisted!

    February 27, 2007

    Kudos on Microsoft

    Filed under: General — Marcus Tettmar @ 12:48 pm

    Nice to see Macro Scheduler listed on microsoft.com in The Vista Application Compatibility list:

    http://support.microsoft.com/default.aspx/kb/933305

    Feels quite an achievement that we are one of the first 800 apps to be listed. On a global level that feels quite good and I believe demonstrates our commitment to future proofing our software and to staying several steps ahead of the competition. No other automation software is listed.

    February 23, 2007

    Remote Citrix Automation the Easy Way with AppNavigator

    Filed under: Automation — Marcus Tettmar @ 8:36 pm

    In my last post I showed you how to write an Image Recognition script in Macro Scheduler to automate a remote Citrix session. I demonstrated how to use Image Recognition functions to look for screen objects and create an Outlook email.

    Well, in this demo I show you how to automate the exact same process using AppNavigator. The video is just over two minutes long and that includes the time taken to build the routine and play it back! You can see that there is no coding involved. Anyone who knows the process could create the routine.

    Watch the video and compare to building the same process with code.

    This is a very basic example where all we do is create an email. In the real world we’d take it further and we may also want to add failover checks to handle situations where window objects fail to appear or change. With the first solution we’d need to modify the code to handle this and our script would become much more complicated. With AppNavigator it would be a simple case of adding a not found action to the relevant images. We could tell it to try again, stop, jump to a different image, send an email (with a screen shot) to admin, run a script … etc. Maintenance becomes so much easier and less prone to introducing bugs compared to modifying long scripts of code.

    February 20, 2007

    How to Use Image Recognition

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

    What is Image Recognition?

    Update. Image Recognition has been vastly improved and simplified since this article was written and in v13 we introduced an Image Recognition Code Wizard. Watch this video to see how simple it is.

    Image Recognition allows Macro Scheduler to find a bitmap (needle) in another, larger, bitmap (haystack) and return its position. The larger bitmap could be a snapshot of the screen, and the smaller bitmap could be a capture of a toolbar button or some other screen object. Therefore Image Recognition allows us to locate objects on the screen, graphically. We can also wait for images to appear on the screen. So Image Recognition allows us to automate any kind of graphical interface. We can make the script wait for images to appear on the screen, find screen objects and therefore send mouse events to the correct part of the screen to focus or control the objects.

    The functions most used for Image Recognition are as follows:

    WaitScreenImage
    FindImagePos
    GetScreenRes*
    ScreenCapture*

    *Note: GetScreenRes and ScreenCapture are no longer required (since v9.2) as you can now specify SCREEN for the haystack in FindImagePos

    Building an Image Recognition Script

    In this video I demonstrate the Image Recognition functions to automate Outlook running in a remote Citrix session. Traditionally automating interfaces in remote environments is difficult without having Macro Scheduler running on the remote server. Trying to automate a remote desktop with traditional commands is unreliable since the client doesn’t know anything about the windows and objects running on the remote server – all it sees is a graphical copy of the screen. This is why image recognition is so powerful in such situations.

    Watch the video and then continue reading this article to learn how the script works.

    In the video I first tell Macro Scheduler to find the position of a button on the screen. I first want the macro to find this button:

    New Email Button

    First I use the image capture tool to capture an image of this button from the screen and save it to a .bmp file. The image capture tool is available in the editor under the Tools menu, and also from the Capture button on the Command Builder dialog for the FindImagePos and other image recognition functions. I save the image to d:\citrix-images\new2.bmp.

    The first thing I need my script to do is determine the dimensions of the screen. This is so that I can capture the entire screen later in the script. So I use the GetScreenRes function:

    GetScreenRes

    This returns the width and height of the screen in variables sX and sY. Next we capture the current screen to d:\screen.bmp using the ScreenCapture command:

    ScreenCapture

    So this captures the entire screen, from 0,0 to sX,sY returned by GetScreenRes.

    Note: Since version 9.2 the above two steps are no longer necessary as it is now possible to specify SCREEN in FindImagePos and do not have to first copy the screen to a bitmap

    Now we want the script to look for the new email button in this screen image using the FindImagePos function. This looks like this:

    FindImagePos

    This looks for new2.bmp inside screen.bmp using a color tolerance of 20 (where 0 is not tolerant and the pixel colors must match exactly and 255 is highly tolerant and anything would match!). We set the fourth parameter to 1 to tell it to return the center coordinates of the image match. If this was zero it would return the top left position in screen.bmp where a match was found. But I would like to return the coordinates of the center position of a match. i.e. the center of the new email button on the screen. XPos and YPos are our variables the coordinates will be stored in. These are arrays. So the first match will be in XPos_0,YPos_0, the second match (if any) in XPos_1, YPos_1, etc. imgs is the return variable which is set to the number of matches found.

    So now we can say “if a match was found, move the mouse to the first position and click”. This looks like:

    MouseMove

    Since we captured the entire screen, the coordinates returned by FindImagePos map directly to screen coordinates. If the ScreenCapture command had not captured the entire screen we would have to add the top x,y coordinates given in the ScreenCapture command as offsets to the MouseMove command. As we captured the entire screen x,y was 0,0 anyway. Sometimes it is not necessary to work with the entire screen and we could instead capture just a Window. Like this:

    MouseMove Relative

    One would then have to add X,Y to any position returned by FindImagePos in order to map to an absolute screen position.

    But back to the demo. We now have code which finds the new email button on the screen and clicks on it. This causes a new window to appear. If we were automating an application running on our desktop we could simply use the good old WaitWindowOpen command which is given the window title and waits for that window to appear. But, remember, this demo is automating a remote environment. The windows are on another computer. We don’t know about window titles. Citrix just sends us an image of the screen of the remote computer. So instead we will use the WaitScreenImage function. This is nice and easy:

    WaitScreenImage

    I used the capture tool to capture an image of the top left part of the new window – showing the window icon and title:

    Window Title

    That was saved to title2.bmp. So the above function simply watches the screen and waits until it finds this image on the screen. When that happens we know the new window has appeared.

    By the way, you could create your own WaitScreenImage using a loop containing ScreenCapture and FindImagePos. This would give you more control and build in a timeout if required. But WaitScreenImage is a quick and easy way to wait for an image to appear on the screen without any further coding.

    Finally, now the script knows the new window is present it can send some keystrokes, so we send some text to create the email. In the real world we’d probably use more image recognition to manipulate other objects on this new window and continue using the same techniques.

    send keystrokes

    Tips

    For performance reasons the image recognition functions do not check every single pixel in each image. That would take far too long. Instead a random sample of pixels is taken from the small “needle” image and each of these is checked against all the possible matching pixels in the larger “haystack” image. For this reason it is possible to get false positives if the image you have captured is not very specific. E.g. consider these two images:

    done

    connecting

    These images are largely similar since we have too much gray area. If the random sample is all from the gray area both would match. These are from a status bar, and if we were searching for Done we could easily find Connecting. The solution here is to make the image smaller so that there is less of the gray background. Alternatively find something more specific on the screen.

    Note: You can override this behaviour by setting the number of pixels to scan using the FIP_SCANPIXELS variable, and since v12 this can be set to ALL to perform an exhaustive match and tests reveal no noticeable performance hit in doing so.

    AppNavigator Does it Without Code

    AppNavigator takes all the coding away from image recognition and also adds some more power. It is clever enough to narrow down a search if it first finds too many matches, or none at all, and it also remembers the part of the screen a match was found in. Next time it will concentrate on that part of the screen and only search the entire screen if a match is not found. This increases performance and reliability. With AppNavigator you can capture screen objects and assign them actions without having to write code like that presented here. AppNavigator can be told what to do when an object can’t be found, and can also navigate the extraction of data from Excel or Access without coding that either.

    To see how easy it is to create the same process with AppNavigator see my next post.

    Update 12th October 2007: Macro Scheduler 9.2 (and above) now lets you specify SCREEN in the haystack parameter of FindImagePos. Therefore if you are scanning the entire screen you no longer need to use GetScreenRes and ScreenCapture to capture the screen to a bitmap file first. Just specify SCREEN in FindImagePos.

    February 9, 2007

    New Direct Access Beta

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

    There’s a new beta version of Direct Access available from our friends at Nagarsoft. Regular readers will probably know how much I love this productivity tool. Direct Access lets you define keyboard abbreviations for commands, applications and folders etc. Once an abbreviation is set up you can type it wherever you are, whatever application is active. It’s great – I no longer wade through long lists of shortcuts in my Start menu, and I no longer have to switch from my open windows to the desktop and scan through desktop icons. All I do when I need to start something, or open my Documents folder is type in the abbreviation and hit F12. Doesn’t matter what window happens to be in front of me. It works like a dream. And it complements Macro Scheduler nicely too. I have a number of important macros that I run several times a day. With them set up to run from a Direct Access abbreviation I just type the macro name on my keyboard and it fires up. Really very handy.

    Nagarsoft want your feedback on this new beta. Details here. This version is fully compatible with Microsoft Vista.

    And don’t forget that Macro Scheduler customers can get 25% off Direct Access. Log into your account to get a coupon code and find out more.

    February 8, 2007

    Skunkworks = Paul

    Filed under: Announcements, General — Marcus Tettmar @ 3:02 pm

    Some regular mjtnet.com forumites may have noticed that forum member SkunkWorks has recently become pgriffin. For those of you that don’t know, Skunkworks, according to Wikipedia, “is a term used in engineering and technical fields to describe a group within an organisation given a high degree of autonomy and unhampered by bureaucracy, tasked with working on advanced or secret projects.” Yes, SkunkWorks is actually none other than our very own Paul Griffin.

    Paul started using Macro Scheduler some years ago as a customer of ours and has become a bit of an expert. For the last few years he has specialised in providing Macro Scheduler consultancy and has made his living from developing Macro Scheduler code for his clients. Under his SkunkWorks persona he has been active in our forums, providing help to other members. About a year ago Paul joined us to help out with customer support. About that time Paul had the idea for AppNavigator, and the SkunkWorks operation began developing in earnest. As you probably know from recent announcements, AppNavigator was officially unveiled a few days ago.

    So Paul is now VP for AppNavigator and has cast off the SkunkWorks forum persona. So for all you forumites, pgriffin = Skunkworks. And congratulations to Paul for the official launch of AppNavigator!