July 14, 2011

Over 30,000 Forum Posts

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

Quoting JRL on the forums this morning:

Just noticed the forum recently surpassed 30,000 articles. That’s a lot of shared knowledge. Good job everyone

It is indeed. What’s more is that forum posts almost always result in success for the original poster – i.e. they find out how to achieve their aims or learn something new and this means other people can learn from the posts too.

I recently had cause to look at the forums belonging to a different automation tool. Now I don’t like dissing the competition but it reminded me how fortunate our users are that we have quite possibly the most active and helpful user community and probably the largest knowledge base for our type of software. Some who consider themselves competitors don’t have forums at all. In fact there aren’t many software products – competing or otherwise – with the kind of user support we have.

Thank you!

June 29, 2011

Get Internet IP Address

Filed under: Scripting — Marcus Tettmar @ 8:55 am

If you are connected to the Internet here’s an easy way of getting your public IP address by visiting checkip.dyndns.org:

HTTPRequest>http://checkip.dyndns.org/,,GET,,HTMLResponse
RegEx>[IPAddress],HTMLResponse,1,ips,num_ips,0
If>num_ips>0
  MessageModal>Your IP is %ips_1%
Else
  MessageModal>Error retrieving IP from checkip.dyndns.org
Endif

June 28, 2011

June 17, 2011

End of Life for Old Versions

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

We do our best to support all our customers whatever version they are using. But there are only so many versions we can run. So after a few years we need to officially “end-of-life” older versions.

To that end, as of January 1st 2012 we will no longer be supporting Macro Scheduler v9 or lower. The latest version is v12. We will continue to provide support for customers using v10 or later. However, please note that right now only v12 is being maintained.

June 13, 2011

Calling Macro Scheduler Functions from PowerShell

Filed under: General, Scripting — Marcus Tettmar @ 11:34 am

Further to my post about the MacroScript SDK the other day, here’s an example of loading the MacroScript SDK COM object from PowerShell and running some Macro Scheduler code:

  $objMS = new-object -comobject "mscript.macroscript"
  $objMS.Init()
  $objMS.RunCode( "Run>notepad.exe" + [Environment]::NewLine + 
  		"WaitWindowOpen>Untitled - Notepad" + [Environment]::NewLine + 
  		"Wait>0.5" + [Environment]::NewLine + 
  		"Send>Hello World", "")
  $objMS.Cleanup()

You will need to put the mscript.dll file into the system path (e.g. System32/SysWow64) or into the PowerShell folder.

Don’t forget that with the MacroScript SDK you can retrieve information and query the data back to PowerShell using the GetVar function (see previous post). So for all you system administrators using PowerShell but needing the GUI automation capabilities of Macro Scheduler as well, the MacroScript SDK is the perfect companion.

June 10, 2011

Macro Scheduler 12.1.7 Available

Filed under: Announcements, Macro Recorder — Marcus Tettmar @ 1:07 pm

Macro Scheduler 12.1.7 is now available for download.

This is a minor update to fix a small mistake in the help file (example for XLGetCell) and also an issue with the macro recorder which would fail to work if it had previously been cancelled after being started from within the Script Editor.

Registered Downloads/Upgrades | Evaluation Downloads | New License Sales

June 9, 2011

About the MacroScript SDK – How to Run Macro Scheduler Code Within Your Own Applications

Filed under: General, Uncategorized — Marcus Tettmar @ 8:46 am

What Is The MacroScript SDK?

The MacroScript Software Development Kit is a software component that allows developers to use the Macro Scheduler scripting language within their own applications. It comes in ActiveX and DLL form so that almost any programming language, including VB, C#, C++, Delphi, PowerBuilder, etc, can make use of it. It makes it possible for other applications to run Macro Scheduler code internally. As well as run Macro Scheduler code it allows the programmer to query or modify MacroScript variables at any point during execution.

Who Would Use It and Why?

The SDK is aimed at application developers. It is commonly used in projects where some integration is needed with other third party or legacy applications where no API exists, or where the developer needs to provide a means of creating macros within their applications.

For example, DM Software in Denmark used it in their Dialog Manager product to simplify integration with other systems and share data with them, as well as allow their users to create scripts for custom integrations. You can read the case study here.

Why Not Just Compile a Macro with Macro Scheduler Pro and “shell” it?

If all you want to do is have your application run a Macro Scheduler macro to perform some automation, then, sure, all you really need to do is compile your macro to a .exe and then call or “shell” this .exe from your application. E.g. using the VB/VBA Shell function.

This might be fine if that is really all you need to do. But what if you want to get data back from the macro? Let’s say the macro scrapes data from a web page and you need to get this data back into your calling application. This would be difficult to do with an external .exe. While you could use temporary file storage or a database and have your .exe macro write the data out and then read it back in with your application, this requires extra work and validation. You also have to consider the implications of the external macro process being terminated prematurely, perhaps by the user.

With the SDK you can execute script code directly from within your application in whole, or in sections or even one line at a time. And between lines or code sections you can directly query the value of a variable or variables. So using the SDK you have much greater control, there is no need to handle shelling out to an external process, waiting for it to complete and reading/writing to file. Instead you can control the logic flow as you wish and access macro data directly, storing it in local variables as and when needed.

– Control of logic flow
– Direct access to script variables
– No need to start an external process

How Do I Use It?

The MacroScript SDK ships with both an ActiveX and native DLL interface so is compatible with the majority of development environments and languages. A basic set of methods provides access to the functionality and examples are included for VB, VBScript, C++, C# and Delphi.

Here’s a simple example in VB:

    Set MacroScript = CreateObject("MScript.MacroScript")
    MacroScript.Init

    'Run notepad and send some text to it
    MacroScript.RunCode "Run>notepad.exe"
    MacroScript.RunCode "WaitWindowOpen>Untitled - Notepad"
    MacroScript.RunCode "Send>Hello World"

    'set variable x to the value entered in Text1 multiplied by 5
    MacroScript.RunCode "Let>x=" & Text1.Text & "*5"

    'get the value of x and put it in Text2
    Text2.Text = "x=" & MacroScript.GetVar("x")
    MacroScript.Cleanup

In the above example first we demonstrate running some code to start Notepad and send text to it. Next we create a MacroScript variable set to the value supplied in a text box on the form multiplied by 5 and then demonstrate how we can retrieve values back from the script.

As well as run script code you can also run script files and pass parameters into code blocks and scripts as you would command line parameters for regular scripts. In addition the ActiveX has script and parms properties and a Run method for an easy way to apply a script and run it.

For more information click here; download the evaluation which includes full documentation and examples; or read a case study on how DM Software makes use of the SDK in their Healthcare Application.

June 7, 2011

Letting off Steam?

Filed under: General — Marcus Tettmar @ 9:04 am

For the licensing mechanism for our ClipMagic product (ClipMagic is an easy to use Windows Clipboard Extender if you didn’t already know) we adopted a server based activation system. I know that some people have a passionate dislike for software that needs to be activated, but you can’t please everyone. And until now we’ve had no complaints.

Then yesterday we get a ticket with no name and an invalid made-up email address saying simply:

“Unfortunately I purchased your product without realizing it required web authorization. I’ll just use a competing product”.

Now, before I’d seen the email address my immediate reaction was to reply and offer a refund. Perhaps I’m too nice but I don’t see the point in having customers that don’t want to be customers. But then I noticed that if I did reply the email would simply bounce. The “customer” has provided no identifying information at all!

I don’t get it. He says he purchased but doesn’t want it – and won’t activate it. Yet doesn’t want me to know who he/she is and isn’t asking for a refund. So why bother emailing me? Letting off steam perhaps. But it seems odd that there was no request for a refund.

I’ll file it away in our “Strange Emails” category.

May 23, 2011

Why Can’t I Colour My Dialog Buttons?

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

Some people have asked why they can’t change the colour of a button that they place onto a custom dialog.

The short answer is that these buttons are standard Windows buttons and are drawn by Windows. And Windows has some “rules”.

Microsoft lays down some design guidelines. Take a look at this document here which says:

If you use standard windows and Windows controls, these border styles are supplied for your application automatically. If you create your own controls, your application should map the colors of those controls to the appropriate system colors so that the controls fit in the overall design of the interface when the user changes the basic system colors.

So, a standard control, like a dialog button will adopt the colour and design as decided by Windows and the user’s system wide preferences and we as the programmer have little or no control over it. Idealistically this is a good thing.

I believe that convention helps usability. If all buttons look alike a user knows it’s a button and so it’s purpose and functionality is obvious.

Of course, there are exceptions and sometimes there may be a reason (justified or not) for ignoring the guidelines and making a button look like something very different, e.g. in a game. So how do you do it? Well, obviously you don’t use standard Button objects.

On the whole Macro Scheduler dialogs are meant to be just that – standard looking Windows dialogs, designed for requesting data from users or giving them choices and controlling macros.

If you want complete freedom to design something snazzy then arguably you are using the wrong technology and should be considering something like Flash or HTML instead. And there’s no reason why such an interface can’t trigger Macro Scheduler macros anyway.

Having said that there are some things you can do to make more glorified looking dialog “buttons”. One option is to use Image objects. Don’t forget that you can respond to a mouse click on any object, so you can easily have a clickable image. You can trap other events too – such as mouse over events. So if you want to be really clever you can have your image’s mouse over event change the image, e.g. to one with a slightly different border style so that the user knows it is the active “button”.