January 26, 2011

WebRecorder Update

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

WebRecorder has been updated with the following fix:

IEAuto 2.09 :

  • Fixed: ClickTag sometimes producing an innertext error in IE9
  • Fixed: FormFill may fill wrong form’s SELECT element when more than one with same name exist in different forms.

WebRecorder 2.5:

  • Fixed: AV caused when a previous document is closed by a new one

Registered Updates | Trial Downloads

January 18, 2011

Slow Mouse Move

Filed under: Scripting — Marcus Tettmar @ 1:33 pm

A support request came in today asking how to show the mouse moving from one point to another slowly enough to be visible in a video demo.

The regular MouseMove function simply “jumps” the mouse cursor straight to the given point, without passing any points between wherever it was to start with and that end point. So the question was how to specify a start point and an end point and show the mouse moving on a line between them.

To achieve this we need to determine what that line is. We don’t want to move to *every* point between those two points on both the x and y axis. So how do we do it?

Well, it was a long time ago but deep in the recesses of my mind was a little equation we learnt in mathematics at school. I admit I had to look it up. It was the “slope-intercept” equation:

y = mx + b

The slope “m” is the change in y over the change in x:

m = (y2 – y1) / (x2 – x1)

Once we have that we can calculate b (the y-intercept) given a known point (e.g. the start point) and then for each x we can calculate y.

So here’s a script which will move the mouse slowly through the line between two given points:

Let>startX=20
Let>startY=100
Let>endX=300
Let>endY=400
Let>delay_interval=0.001

//remember school math?
//equation of a line is y = mx+b

//m = y2-y1 / x2-x1
Let>m={(%endY%-%startY%)/(%endX%-%startX%)}
//b = y-mx
Let>b={%startY%-(%m% * %startX%)}

Let>x=startX
Let>y=startY
Repeat>x
   //y = mx+b
   Let>y={Trunc((%m% * %x%) + %b%)}
   MouseMove>x,y
   Wait>delay_interval
   If>endX>startX
     Let>x=x+1
   Else
     Let>x=x-1
   Endif
Until>x=endX

This probably isn’t much use to most people, but it’s a little bit of fun. Maybe you can jazz up your scripts to animate the movement of the cursor or something 🙂

Doing anything a little bit out of the ordinary with Macro Scheduler? Let me know.

January 10, 2011

Video Tutorial – Custom Dialogs Part 2

Filed under: Tutorials — Marcus Tettmar @ 2:32 pm

Happy New Year All! And to start the new year here is part 2 of the Custom Dialogs Tutorial I promised last month. In this 24 minute video I expand on what we did in part 1 to look at check boxes, combo boxes, setting property values at runtime, method event handlers and consider how we can validate user input before closing the dialog.

Click here to view a larger version or click on the full screen icon on the video control panel above.

If you haven’t seen Part 1 yet you will find it here and my previous blog post about it here.

I hope this is helpful. Please let me know what else you’d like to see in a video tutorial (dialogs and otherwise).

December 22, 2010

Macro Scheduler 12.1.3 Available

Filed under: Announcements — Marcus Tettmar @ 1:18 pm

Macro Scheduler 12.1.3 is now available with the following fixes since my last update announcement:

  • Fixed: RSS NewsFeed Window not timing out if a connection can’t be made. Added timeouts.
  • Fixed: Last file in GetFileList wrong if a delimiter with more than one character used.
  • Fixed: Macro Schedler Lite: Opening standalone editor causes crash.
  • Fixed: Help file incorrectly states timeout for Input command returns “YES”.
  • Fixed: Compiler: If compiling an include that cannot be found or is made up of user variables, include was removed. Should be left as dynamic include.
  • Fixed: Issue with comma in ExecuteFile – not parsed same as other commands.
  • Fixed: Editor: Files in code that are opened in new tab from context pop up menu are not saved correctly.
  • Fixed: Help file topic for FTPMakeDir had incorrect abbreviation and was not indexed.
  • Added: Image Capture tool now prompts if closed before captured image is saved.
  • Added: Codebuilders for image capture commands will now auto-fill the first parameter with the filename saved with the image capture tool.

Workflow Designer and the SDK have also been updated to the same MacroScript version.

Registered Downloads/Upgrades | Evaluation Downloads | New License Sales

December 21, 2010

Automated Truck Tracking

Filed under: Success Stories — Marcus Tettmar @ 3:43 pm

The following was just posted over in the “Tell us how Macro Scheduler helps you, what you use it for.” forum thread:

We currently use it for two primary applications. One is to pull returning truck information out of a fleet management dispatch application for a produce brokerage company and dumping that information into a webpage for remote salespeople to use to find out where available empty trucks are located.

Secondly we use it to track trucks by integrating our dispatch application with google latitude. This automates what is called the Check Call process where a trucker would normally have to be contacted by phone. Now the script simply queries their latitude information and plugs that information into our dispatching application.

How do you benefit from using Macro Scheduler?

December 16, 2010

Video Tutorial – An Introduction to Custom Dialogs

Filed under: Tutorials — Marcus Tettmar @ 3:20 pm

A frequent request has been a video tutorial on creating and using dialogs. There’s a lot to dialogs and it’s impossible to address everything in one video so here’s a 10 minute introduction to get started with:

You might want to click here to view a larger size video, or click the full screen icon on the control panel above.

Hopefully this video serves as a useful starting point and we can move on to look at more objects and properties, setting property values at runtime and event handlers in future tutorials.

December 15, 2010

Mixing the Native Excel Functions with VBScript

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

Macro Scheduler comes complete with some native functions for controlling Excel, such as XLOpen, XLGetCell, XLSetCell and others. Obviously, although we intend to add more functions over time, not every possible Excel function has been duplicated. So sometimes you may want to utilise COM via VBScript which allows you to access the entire Excel API. There are plenty of examples of this here in the blog and on the forums.

But what if you want to use a combination of both? You might already have a script which uses the native XL functions to open a sheet and get or set some data. Let’s say you now want to augment this with an Excel method which is not exposed by the native functions. Rather than re-writing your entire script to use VBScript, is there a way we can let VBScript take over?

While it’s not possible to share native XL references with VBScript object references, what we can do is have VBScript attach to an open instance of Excel using the GetObject function. So sometime after running XLOpen we could then run a VBScript function which does a GetObject to get an object reference to Excel and then after that we are able to utlise any Excel function we like via VBScript.

The following script demonstrates:

VBSTART
  Dim xlApp
  Dim xlBook
  Sub GetXL
    Set xlApp = GetObject(,"Excel.Application")
    Set xlBook = xlApp.ActiveWorkbook
  End Sub

  Function FindCell(Sheet,Data)
    Dim theCell
    Dim xlValues
    xlValues = -4163

    Dim xlSheet
    Set xlSheet = xlBook.Worksheets(Sheet)
    xlSheet.Range("A1").Select
    Set theCell = xlSheet.Cells.Find(Data, xlApp.ActiveCell, xlValues)
    FindCell = CStr(theCell.Row) & ":" & CStr(theCell.Column)
  End Function
VBEND

//Open an XLS file natively
XLOpen>%SCRIPT_DIR%\example.xls,1,xlH

//Call GetXL to give VBScript a reference to the XL instance
VBRun>GetXL

//now we can access any XL function via VBScript
VBEval>FindCell("Sheet1","Price"),res

The only thing to be careful of is that there are no existing copies of Excel open before the one opened by XLOpen because according to the Microsoft docs GetObject will attach to the first opened instance. You could of course make the script check for this.

December 14, 2010

15% Off T-Shirts Today at Zazzle

Filed under: Announcements, General — Marcus Tettmar @ 3:43 pm

Thought I’d share this: I just noticed that Zazzle are currently offering 15% of all orders today (14th December) only with code JINGLESALE75. Also free shipping on orders over $50. More details are here. So if you were thinking of grabbing a shirt (even if it’s not one of ours!) now could be a good time!

December 13, 2010

Macro Scheduler T-Shirts and Merchandise

Filed under: Announcements, General — Marcus Tettmar @ 10:54 am

With Christmas round the corner I thought I might post a reminder that we have a number of official logo T-shirts, mugs and mouse mats available via Zazzle.com:

December 3, 2010

Workflow Designer 3.0.01 Update

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

A minor update to Workflow Designer 3 today as well: When attempting to open script code in the Macro Scheduler editor it would fail to find the Macro Scheduler 12 editor and instead try to open the Macro Scheduler 11.x editor. So if you had v11 installed it would open in that. If you only had v12 installed it would fail to open at all. 3.0.01 fixes this so that it first tries v12 and then only tries to open in v11 if v12 is not found.

Registered users can download the update from the registered downloads page. Evaluation versions are here.

Workflow Designer ships with Macro Scheduler Pro Enterprise.