January 17, 2013

Powerful, Tolerant, Portable Image Recognition Coming Soon

Filed under: Announcements — Marcus Tettmar @ 10:56 pm

Macro Scheduler 14 is right round the corner and with it comes a super new Image Recognition engine with a pattern matching algorithm which can cope with changes and differences in target images. This makes it more portable across different display settings and operating system versions.

To whet your appetite here’s a video from Antonius Momac demonstrating the power of the new image recognition engine in Macro Scheduler 14:

Macro Scheduler 14 is due out very soon. Stay tuned for more news.

January 7, 2013

Happy New Year

Filed under: Announcements — Marcus Tettmar @ 12:46 pm

2013 – the first year since 1987 to have four different digits in the name.  There’s a useless bit of info for you.

It is also our 16th year in business.  16 years of Macro Scheduler!  Still going strong.

I say it every year but I’ll say it again: We wouldn’t still be here if it wasn’t for all you guys who continue to use Macro Scheduler, support us by purchasing licenses and upgrades, tell your friends and colleagues and send us encouraging feedback.  Thank you all!

Anyway it feels like it has been a long “holiday” here in the UK.  Schools went back today so it finally feels like things have returned to their usual routine.

And now we’re back, development work continues on Macro Scheduler and I should have some more news for you later in the month.

Take care.

December 18, 2012

Play A Puzzle Game Created with Macro Scheduler

Filed under: Announcements — Marcus Tettmar @ 4:59 pm

Forum regular, JRL, has created a little graphical puzzle game using nothing but Macro Scheduler.

Check it out here.  Very impressive.

Usually Macro Scheduler is saving businesses time and cutting their costs.  Sometimes however, it’s ok to have a little fun.  Especially at Christmas! 🙂

And speaking of puzzles, there are still 5 prizes up for grabs for the crossword.  See below.

December 11, 2012

Macro Scheduler Crossword

Filed under: Announcements, General — Marcus Tettmar @ 9:47 am

For a bit of fun this holiday try out our cryptic crossword.  Solve the clues to find Macro Scheduler functions and names of some of our regular forum users.

There are 10 MJT Gearhead mugs up for grabs for the first 10 correct entries.

If you get stuck keep an eye on our Facebook page for clues.

You can either print this out to work from or click on the puzzle for a flash version. Either way make sure you send your answers to [email protected]

I hope you enjoy solving this as much as we enjoyed putting it together.

December 7, 2012

October 30, 2012

Controlling Apps that Run as Admin

Filed under: Automation, Vista, Windows 7, Windows 8 — Marcus Tettmar @ 10:16 am

By now you are probably aware of UAC (User Account Control) that came along when Vista was released. And you probably know that to do anything like copy files to Windows\System32 or Program Files or do other administrative stuff you need to be running as Admin, or you’ll get the UAC prompt come up asking you for permission to continue. And when you continue the thing you launched is then running as admin.

For sensible reasons, Windows is designed so that an ordinary level process – i.e. an application that is running under a standard user account without administrative privileges (let’s call it an un-elevated application) is not allowed to manipulate, interact with or exchange information with an elevated process (one running with administrator privileges or “As Admin”).

Macro Scheduler runs “as invoker”. In other words it runs at the level of the user who starts it. In most cases, and by default, that means it is running without administrator privileges. Unless you have disabled UAC, or chosen to run Macro Scheduler as admin, or have set the Macro Scheduler shortcut properties to launch Macro Scheduler as admin, then Macro Scheduler will run as a standard user without administrative privileges.

Since a standard process is not allowed to manipulate an admin process, Macro Scheduler is not able, by default, to send keystrokes into windows belonging to processes running as admin.

Try it. Run Notepad as admin and then try the following simple macro in Macro Scheduler:

Setfocus>Untitled – Notepad
Send>Hello World

You’ll see nothing happen. The text “Hello world” will not arrive in Notepad.

Now close Notepad and run Notepad as normal and of course the script works.

So what do you do if you NEED to send keystrokes into an admin level window? Well, unless it is possible to run that process as an ordinary user you will need to also run Macro Scheduler as admin.

To run Macro Scheduler “elevated” as admin, right click on the Macro Scheduler shortcut and select “Run as Administrator”. If you have UAC enabled (the default) you’ll see the UAC confirmation box pop up to make sure you’re happy to continue. Ok that and now Macro Scheduler is running as admin.

Now try running Notepad as admin again and you’ll find our little macro works.

Some legacy applications written before Vista came along were developed assuming the user had administrative privileges, which was common in the days of XP. This was poor practice but widely done. A common transgression was that they would write their settings and files to the Program Folder. In order to run these applications under Vista or later they would therefore have to be run as Admin, unless there was any way to force them to write data to another more sensible location. Sadly there are still applications that do this, especially older ones that are no longer maintained. Since the only way to use such legacy apps on Vista/Win7/Win8 is to disable UAC or set them to run as admin and put up with the UAC prompt, if you need to automate them you’re going to have to also run Macro Scheduler (or your compiled macro) as admin.

Short version: If you wish to automate an elevated application (one that runs as admin), Macro Scheduler or your compiled macro, also needs to be running elevated.

October 29, 2012

Macro Scheduler 13.2.2 Available

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

Macro Scheduler 13.2.2 Update is now available with the following changes:

  • Fixed: ReadFile errors not being trapped correctly
  • Fixed: If a macro is being edited and its schedule fires, a file lock error occurs, macro should not be run by scheduler if being edited
  • Fixed: IEGetTagsByAttrib not setting correct array index
  • Added: IEWait function

Registered Updates | Trial Downloads | Upgrades

My Most Used RegEx

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

It occurred to me the other day while working on a script for a customer that I use this regular expression frequently:

(?<=TOKEN1).*?(?=TOKEN2)

It is very useful when parsing information out of web pages, or when finding elements in web pages.

What it does is pull out all the text between TOKEN1 and TOKEN2. Those could be other pieces of text, or html characters, or whatever.

As an example, recently I wrote a script which loops through all rows in an HTML table, and pulls out an order number, then looks this order number up in an Excel sheet. The order number appeared in a table cell along with other information. It was the first item inside an <i> (italics) tag and was followed by a space and then a hyphen. So I used this to pull it out of the row:

RegEx>(?<=<i>).*?(?= -),this_row,0,matches,nm,0

See how it looks for everything between the ‘<i>’ and ‘ -‘ (space then hyphen).

The next thing my code needed to do was find the ID of the single input field in the same row. This input was used to enter the order quantity, obtained from the Excel sheet. The ID is not something we know up front but it’s the only input field in the row. So I did this:

RegEx>(?<=id=").*?(?="),theInput,0,matches,nm,0

In other words, pull the text between id=” and “, which gives us the input’s ID value. We can then use that later to identify and fill the input field.

Regular Expressions are daunting at first. But eventually you find a small number of patterns help in many situations. This is one that I often find useful.

What’s your oft-used regular expression?

October 18, 2012

Amazon Timetravel 1.0

Filed under: General — Marcus Tettmar @ 1:42 pm

Gotta love Amazon. Received the following in an email today 18th October. I have removed identifying info. Emphasis mine:

date: 18 October 2012 11:53
subject: Your Amazon.co.uk Enquiry

I’m sorry to hear that you haven’t received your order ############# yet.

I’ve checked and can see that it was sent via DPD_24_PRIME to the following address:

redacted
redacted
redacted

The estimated delivery date given for this order last 17 Oct 2012

Your order is still in transit and I’m confident that it’ll arrive by the estimated delivery date. You can confirm the estimated delivery date by visiting the “Your Orders” section of Your Account or by clicking on the following link:

https://www.amazon.co.uk/gp/css/history/orders/view.html

Awesome!

October 3, 2012

Sending/Retrieving Emails via Gmail

Filed under: Automation, Scripting — Marcus Tettmar @ 9:36 pm

Since version 13.2 Macro Scheduler‘s email functions now support SSL. Google’s Gmail and many other email services now insist on SSL secured connections.

To use SSL you first need to install the OpenSSL library files.

Here’s an example of sending an email via Gmail:

Let>SMTP_AUTH=1
Let>[email protected]
Let>SMTP_PASSWORD=your_password
Let>SMTP_PORT=465
Let>SMTP_SSL=1
SMTPSendMail>[email protected],smtp.gmail.com,[email protected],your name,test,hello world,

And to retrieve emails from Gmail via POP3 (make sure you have enabled this in your gmail settings):

Let>POP3_PORT=995
Let>POP3_SSL=1
RetrievePOP3>pop.gmail.com,[email protected],your_password,c:\emails\in\