August 11, 2009

Windows 7 Keyboard Shortcuts

Filed under: General, Windows 7 — Marcus Tettmar @ 4:37 pm

Back in January we were able to download the Windows 7 beta and I reported that Macro Scheduler 11 is fully compatible with Windows 7. Yesterday the final RTM (Release to Manufacturing) version was made available to MSDN subscribers and so today I upgraded my Vista desktop to Windows 7.

I am pleased to report that the upgrade went painlessly. The only issue I encountered after the upgrade was lack of audio which was easily rectified with a visit to Creative’s website and a download of the updated driver for my audio device. Needless to say, Macro Scheduler is running smoothly under this shiny new interface.

Most people seem to be saying that Windows 7 is the Vista upgrade that makes Vista what it should have been. Seems pretty slick so far, but I’ll report back after I’ve been using it a while.

In the mean time here’s a full list of keyboard shortcuts in Windows 7 which may come in handy for Macro Scheduler developers.

Find and Click on Screen Text with MODI

Filed under: Automation, Scripting — Marcus Tettmar @ 8:21 am

Gale Dyvig has just posted some code in the forums showing how to use the Microsoft Office Document Imaging OCR component to locate text on the screen, find its position and click on it. Very useful. You’ll find it here.

MODI is a component that comes with Microsoft Office. You need to ensure Microsoft Office Document Imaging and Office Shared Features / Proofing Tools is installed in Office Tools.

Thanks Gale!

August 5, 2009

Examples are Examples

Filed under: General — Marcus Tettmar @ 10:20 am

Examples are examples not doctrine. In the topic on the “Release” command in the Macro Scheduler help file it mentions that to exit a program you might do:

Press ALT
Send>fx
Release ALT

This would hold down ALT while sending the f and x keys before releasing the ALT key again. Commonly this invokes the standardised File/Exit menu option.

But this is not always true. Not all apps have these options. Not all aps have a File menu. And as we’ve seen in my last post, not all apps work the way we would expect them to. The above is just an example. It’s not dictating the way all Windows apps work. Not every application is the same or obeys the “rules”.

July 27, 2009

Think like a user, not a programmer

Filed under: Automation — Marcus Tettmar @ 3:23 pm

I just helped out a customer who was getting increasingly frustrated trying to get a macro to select a menu. The menu shortcut key was “g” and all he was trying to do was send Alt-g to the window. But whatever he tried he couldn’t get it to work.

Being an experienced programmer who had built Windows interfaces he had assumed that ALT-g (Alt together with “g”) would work:

Press ALT
Send>g
Release ALT

But nothing happened. He added waits in all sorts of various places but no cigar.

Eventually he called me up for a BeamYourScreen session and I took a look. I went back to basics, and tried the app out manually, making no assumptions. I entered ALT-G (g together with the ALT key) and found nothing happened. I then pressed the ALT key and released it. The app focused the first “File” submenu. I then hit “g” on its own and the required menu opened. Bingo.

Turns out the app doesn’t work the way either of us expected. The shortcuts should work when sent with the ALT key held down. But that wasn’t the case. One had to press ALT, release it, then send the shortcut character on its own. So the working code was:

Press ALT
Release ALT
Send>g

The mistake here was making assumptions based on our expectations and prior knowledge. A less experienced user may actually have got it working sooner by not taking anything for granted.

The trick to automating an app is to go back to basics, break it down and actually watch what you do. If my customer had actually tried it manually and taken a closer note of what exact keystrokes he had pushed, he would have made progress faster, instead of assuming that the app worked the way any UI guru would expect, and blaming the macro when it didn’t.

Think like a user not a programmer. To automate something first try it manually, write down or remember what sequence worked then replicate that in the macro – just as I preach in the Beginner’s Guide and Getting Started Guide.

No matter how technical you might be, this getting started guide is helpful.

July 20, 2009

Programming Results without Programming Experience

Filed under: Podcasts — Marcus Tettmar @ 9:47 am

In our newest customer podcast Joe Kitt of John R Lyman Company talks about their Order Auto-Acknowledgement system he built using Macro Scheduler which automatically acknowledges all orders coming into their ERP system. Although Joe has been working in IT for 20 years he has so far avoided doing any programming and says that Macro Scheduler allowed him to achieve programming results quickly without any programming experience. At John R Lyman Macro Scheduler is now helping to cut down on manual processes, increase efficiency and awareness and improve the quality of their data.

Download Listen

Listen to more Customer Podcasts.

July 2, 2009

Selecting from a Drop Down List

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

A project I’m currently working on involves populating data into a rather poorly designed user interface.  A particular challenge were the drop down lists and list boxes due to the fact that you can’t “drill down” by sending the text of the item you want selected.

The solution we settled upon uses the text capture function GetTextAtPoint in a loop which arrows down the entire list, with GetTextAtPoint capturing the text in the selection box to see if it’s the value required.  If it is we stop, else we continue to press down and loop.  We stop if the item selected is the same as the previous item, signifying that we’ve reached the end (obviously this assumes the list doesn’t have duplicates appearing together).

Here’s the subroutine:

SRT>dropDownSelect
/*****
Usage: GoSub>dropDownSelect,X,Y,text_to_select

Where X and Y are coordinates in the edit box (where the item appears once selected)
 and text_to_select is the text you want selected  

Important: the drop down needs to have the focus
*****/
  If>dropDownSelect_Var_3<>
    GetTextReset
    Press Home
    Wait>0.1
    Let>prev_comboText=Z@$%#XXX
    Let>dropDownFound=FALSE
    Label>select_drop
    GetTextAtPoint>dropDownSelect_Var_1,dropDownSelect_Var_2,comboText,c
    Pos>dropDownSelect_Var_3,comboText,1,p
    If>p<>1
      If>prev_comboText<>comboText
        Press Down
        Wait>0.2
        Let>prev_comboText=comboText
        Goto>select_drop
      Endif
    Else
      Let>dropDownFound=TRUE
    Endif
  Endif
END>dropDownSelect

So, for example, you could call it something like:

Press Tab
GoSub>dropDownSelect,240,355,Apples

Note that the drop down needs to be focused. Usually you’d be “tabbing” through fields on the form, so once you’ve used “Press Tab” to get focus onto the control you can call dropDownSelect.

This version requires that you pass the X,Y screen position of the text box area of the drop down. In development at the moment we have a new function which returns the handle of the currently focused object, and this can then be used in GetWindowPos to get the X,Y position. So in future you will be able to determine the X,Y position dynamically.

Hopefully you won’t need this function as you can usually “drill down” on a list box or drop down list by sending the text of the item you want as mentioned here. But for those badly designed controls that won’t allow that this function can be a life saver.

June 29, 2009

Macro Scheduler 11.1.12 Update

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

Macro Scheduler 11.1.12 is now available with the following changes:

  • Fixed: FTPGetDirList issue with format of directory list and wildcard matching with some flavours of FTP server
  • Fixed: Issue with ExportData adding extra erroneous character to end of exported text files
  • Fixed: FindImagePos using SCREEN for haystack fails under Remote Desktop/Terminal Server session

Registered Downloads/UpgradesEvaluation DownloadsNew License Sales

June 26, 2009

Weddings and Updates

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

Apologies for the quietness on my blog lately.  This month has been a busy one for me personally as on 13th June I – finally – married my partner of 6 years (and the mother of my children), Angela, and went away for a short, but very relaxing, honeymoon last weekend.

We at MJT have also been busy working on some client projects, so it has been a bit of a manic month all round and I didn’t manage to get a newsletter out for June.   But I plan to put one together for next week.  We should also have a Macro Scheduler maintenance release out soon, and have also started on some new video tutorials.  So watch this space!

June 8, 2009

Macro Scheduler 11.1.11 Update

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

Macro Scheduler 11.1.11 is now available with the following changes:

  • Fixed: Some issues with running macros via msNet (Remote Controller) component (Enterprise)
  • Fixed: Image Capture Tool incorrectly focusing main window after capture when run in standalone editor mode
  • Improvement: StringReplace speed improvements

Registered Downloads/Upgrades | Evaluation Downloads | New License Sales