Marcus' Macro Blog

Tips and News on Macro Recording and Automating Windows with Macro Scheduler
April 10th, 2014 by Marcus Tettmar

We now have a fancy new Knowledge Base system. Check it out at:

help.mjtnet.com

To get things started we’ve moved over the FAQs, the video tutorials and gone through the blog for juicy articles we think should be in the knowledge base.

This new home puts all the support resources under one roof and there’s an easy way to email support if you can’t find what you are looking for.

We’ll be adding new articles on an ongoing basis and if there’s anything you think should be included, or you have an idea for a tutorial please do not hesitate to drop us a line.

April 9th, 2014 by Marcus Tettmar

You may have heard about the OpenSSL vulnerability called Heart Bleed. If not there’s some info here.

mjtnet.com is safe!

I just wanted to let you know that our servers have been patched with the latest update and are not vulnerable. As a precaution we also reissued our SSL certificate. The company we use for e-commerce transactions – WorldPay – is also safe and secure.

March 31st, 2014 by Marcus Tettmar

Have you ever tried to send a piece of Macro Scheduler code (or any other code for that matter) to someone by email or instant messaging, or even in a forum, and found that it gets mangled? HTML strips leading spaces, characters get stripped or changed, and special characters get inserted and so on. Even when the code works it ends up looking ugly and is hard to read.

But now you can use our Code Snippets tool. You can access it via your Forum account and you’ll find it in the forum nav menu (top right of forum pages). Or go direct here (you’ll need to be logged into the forums – you can create an account for free if you don’t already have one).

Simply give your snippet a title and paste your code into the box. When you save it you’ll be given a special link which you can give to anyone, via email, forum, instant messaging, or however you like, and you can be sure that the recipient will be able to see your code, all nicely formatted and syntax highlighted. They can copy and paste it safely into a Macro Scheduler script without it being messed up, or they can view the raw file.

Here’s an example: http://www.mjtnet.com/snip.htm?g=533575bab6f58

You’ll also get a special forum embed code. Use this if you want to paste your code into a forum post. Instead of pasting your code, paste the embed code and then when your post is viewed it will display a nicely sanitized version of your code.

Over on the right of the Code Snippets page you’ll also see a list of snippets you’ve already made. If you need to grab the link or embed code just visit a snippet page and you’ll see the link and embed code at the bottom.

So, now, if you’re sending pieces of code to our support desk via email or live chat, to a friend or colleague or in the forums, please use Code Snippets. :-)

Note that Code Snippets, as it’s name implies, is designed for small scripts and code examples. If you need to send a huge script to someone it’s probably best to send the raw script file as an attachment.

March 27th, 2014 by Marcus Tettmar

You might find that when you run a compiled macro and you also have Macro Scheduler running, Shift-Esc – the default stop key sequence – doesn’t stop the compiled macro.

This is because the stop key sequence is a system wide hot key. And system wide hot keys can only be registered for use by one application at a time. So if Macro Scheduler is already running when you start your .exe the .exe is unable to register Shift-Esc because Macro Scheduler already has it.

Of course when you deploy your .exe to people who don’t already have Macro Scheduler – which is usually the case – there won’t be any problem because Macro Scheduler won’t be running and so your .exe is able to register the Shift-Esc hot key.

But what if you want to define your own stop hot key, or you want to give your users the option of setting it? Well what you need is a KEY_DOWN event handler:

//CTRL-Z is stop key
OnEvent>KEY_DOWN,VK90,2,doExit
Let>paused=FALSE

//sample code here ...
Wait>20
MessageModal>hello

SRT>doExit
   Exit>0
END>doExit

Here we have set up a key down event handler for CTRL+Z. VK90 is Z and 2 is the modifier key for CTRL. See the OnEvent help topic and Virtual Key Codes List.

The event handler basically sets up a concurrent thread that is running all the while the main script is running. This allows it to respond to events such as this KEY_DOWN event. So when you hit the specified key sequence – in this case CTRL+Z, the doExit subroutine runs and all that does is call the Exit function which terminates the script.

You could be smarter and ask the user if he really means he wants to exit:

SRT>doExit
   Ask>Are you sure you want to exit?,ynExit
   If>ynExit=YES
      Exit>0
   Endif
END>doExit

When you compile the macro there is an option to disable the standard Shift-Esc sequence. So you could do that to completely replace the stop key system with your own custom one using your OnEvent.

Consider an INI file and possibly another config script using a custom dialog to allow the user to set his own stop key sequence. Other apps could already be using it. My CTRL+Z example is probably not ideal as although it is used in Linux to suspend the current process it is usually the short cut for Undo in Windows.

March 18th, 2014 by Marcus Tettmar

Someone was asking how to get a list of subfolders. You can do that with the GetFileList command by setting GFL_TYPE to 1. That gives you the folders in the specified path. But it turns out he wanted a recursive list – i.e. one that drills down through all levels.

To do that you need a recursive function. In Macro Scheduler we can do this by making a subroutine call itself. I’ve added an example on the Scripts ‘n Tips forum. Here.

http://www.mjtnet.com/usergroup/subfolder-recursion-t8185.html

For a bit of fun go to Google and search for “recursion” and see what you get:

March 17th, 2014 by Marcus Tettmar

Macro Scheduler 14.1 is now available.

Here’s a summary of changes in Macro Scheduler 14.1:

  • New UI Automation functions for manipulating “Accessible” objects (UI Automation Elements).
  • New FindObject Wizard for locating objects, detecting accessible elements and outputting code to manipulate them.
  • Support for HTML email in SMTPSendMail
  • New HTMLViewer component for custom dialogs
  • Macro Recorder speed/reliability improvements
  • Other new functions and improvements.

The most notable addition here is the support for UI automation elements.  What’s this all about?

Well, this makes use of Microsoft’s Active Accessibility framework which allows application developers to expose UI elements to other applications.  It was originally designed to help accessibility tools like screen readers and also for automated software testing applications.

Essentially it means that the controls of applications – the UI elements such as buttons and form fields – can be more easily identified and manipulated.  Controls can be identified by name.  Here’s a short video showing this in use:

Bear in mind that what you can do with this will vary from application to application and what is possible will depend very much on what the application developer has exposed. If a developer hasn’t specifically named elements or knowingly used Accessibility, Windows will in many cases – and assuming a standard windows UI framework has been used – expose the controls anyway and will name objects based on their captions and labels.

To make it easy to identify elements we’ve added the Find Object Wizard which will show you the Accessible object beneath the cursor and let you create code to manipulate it (e.g. click it or set it’s value).  So using this you can experiment with what is possible with the application you want to automate.   Please let us know in the forums which applications you have used this with.

Assuming this new functionality proves useful, expect more features and improvements in future.

Trial Downloads | Registered Downloads | Version History

March 6th, 2014 by Marcus Tettmar

Do you know what code signing is?

Want to prevent those “unknown publisher” warnings that might pop up when you or your clients download and run your compiled macros?

Then you need a Code Signing Certificate to sign your .EXEs with.

Read on:

http://www.mjtnet.com/blog/2011/04/26/authenticate-your-exes-discounted-code-signing/

It’s not always when downloading files that you might get this warning. Recently a customer found a .EXE that he was launching from a reporting tool was producing this warning.  It seems the reporting tool was checking for a code signing signature.  Virus checkers including Windows 8′s SmartScreen filter will also look upon signed apps more favourably.

February 27th, 2014 by Marcus Tettmar

Thanks to Dorian our youtube channel is looking great:

Macro Recorder and Windows Automation Youtube Channel

http://www.mjtnet.com/youtube

This is the home of all our videos, including video tutorials which you’ll also find here.

February 20th, 2014 by Marcus Tettmar

If you’re seeing odd results when trying to send keys to Citrix Receiver windows try going into legacy mode:

Let>SK_LEGACY=1
Send>some text

February 12th, 2014 by Marcus Tettmar

In forum post “Is it a Macro Recorder, is it an Automation Tool, or ….” Antonius asks how we can make Macro Scheduler more popular.  This is not the first time I’ve been asked this.

The easiest and quickest way to help is to Share.  At the top right of every page of the website are some “Social Sharing” buttons.  

Click on your favourite social networking site (e.g. Facebook, Twitter or Google+) to share www.mjtnet.com with your followers.  Click the +Share link to get a list of other places you can share to.

Or you can use this link here:

Share

Clearly we’d LOVE it if you shared. All businesses, especially small ones, need new customers. But apart from that we want to build the user community for the benefit of everyone. More users means more forum peers, more product ideas and an even better Macro Scheduler. So, go on, get sharing :-)

Thanks.

    • Get FREE Consultation



      Archives

  • Categories