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

Custom Event Triggers

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

Did you know you can make just about any kind of schedule or trigger using Custom Event Triggers?

You’ll find the custom trigger option under Macro Properties in the Trigger tab.

Parsnipnose3000 has just posted a tip on Custom Event Triggers to the forums, showing how you can have a macro fire based on an image appearing on the screen. Check it out.

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\

September 27, 2012

Video Tutorials on YouTube

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

We recently had some problems with the service we were using to host our video tutorials (divshare.com). Since most of them were also on YouTube we have therefore updated our YouTube channel to include all the videos and have modified our site so that the videos are now served from YouTube.

My only worry is that some companies may block YouTube, although I was also aware that some organizations also blocked divshare. So I guess you can’t win. If you are accessing our site from behind a company firewall and can’t view our videos drop us a line and we’ll see what we can do.

September 18, 2012

The Macro Scheduler Water Cooler

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

The Macro Scheduler Water Cooler

We now have our very own Water Cooler over in the forums. Come and say hello.

Older Posts »