May 12, 2016

Customizing Message/Input Boxes

Filed under: General, Scripting — Marcus Tettmar @ 12:30 pm

Every now and then someone asks something like “How do I change the font in a modal dialog box?” or “Can I make an Input box multi-line?”.

Well, no, you can’t do those things to the standard Message/MessageModal or Input box functions. But, don’t forget that with Macro Scheduler you have the ability to create your own dialogs and make them act and feel pretty much any way you like. So the answer to the above questions, is “Create your own versions”.

As an example, let’s say you want a modal dialog that looks and acts much like the standard modal message box created by MessageModal. Only you want the text to be green in an italicized aerial font. Here you go:

//this would go at the top - customize as you wish
Dialog>CustomMsgBox
object CustomMsgBox: TForm
  Left = 493
  Top = 208
  HelpContext = 5000
  BorderIcons = [biSystemMenu]
  BorderStyle = bsSingle
  Caption = 'My Message'
  ClientHeight = 170
  ClientWidth = 319
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = True
  ShowHint = True
  OnTaskBar = False
  PixelsPerInch = 96
  TextHeight = 13
  object MSMemo1: tMSMemo
    Left = 0
    Top = 0
    Width = 321
    Height = 137
    Font.Charset = ANSI_CHARSET
    Font.Color = clGreen
    Font.Height = -11
    Font.Name = 'Arial'
    Font.Style = [fsBold, fsItalic]
    ParentFont = False
    TabOrder = 0
  end
  object MSButton1: tMSButton
    Left = 121
    Top = 143
    Width = 75
    Height = 25
    Caption = 'OK'
    DoubleBuffered = True
    ModalResult = 2
    ParentDoubleBuffered = False
    TabOrder = 1
    DoBrowse = False
    BrowseStyle = fbOpen
  end
end
EndDialog>CustomMsgBox

SRT>ShowMsg
  SetDialogProperty>CustomMsgBox,,Position,poScreenCenter
  SetDialogProperty>CustomMsgBox,MSMemo1,Text,ShowMsg_Var_1
  Show>CustomMsgBox,r
END>ShowMsg

//do this to call your message
Let>MyMsg=Hello world, this is a lovely custom message box
GoSub>ShowMsg,MyMsg

And don’t forget that once created you can call the dialog any time you like. And if you want to use it in lots of scripts then put the dialog block and subroutine into an include file and use Include> at the top of each script you want to use it in.

Now, it’s over to you. Use your imagination and style the dialog any way you like. We have some Custom Dialog tutorials here: Part1, Part2

April 19, 2016

Newsletter Subscriptions

Filed under: Announcements, General — Marcus Tettmar @ 1:53 pm

I’ve only just discovered that our newsletter subscriptions system has been broken since last January! New customers and anyone signing up to our newsletter since 15th January 2015 were not correctly subscribed to our newsletter. Luckily we have the email addresses in our database, they just weren’t allocated to the correct list. I’ve now fixed this and moved affected email addresses to the correct list. So those affected will now start receiving our newsletters. Hopefully you won’t be too surprised when you start receiving newsletters from us.

February 11, 2016

January 13, 2016

Happy New Year!

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

A slightly belated Happy New Year to all our customers and supporters. I’m a little late getting this up as we are in the midst of an office move! So things are a little hectic.

But wanted to say thank you to you all for being with us and we look forward to working with you in 2016 and beyond!

December 10, 2015

Variable Breakpoints

Filed under: Scripting — Marcus Tettmar @ 2:02 pm

You may already be familiar with the Macro Scheduler debugger and know how to set code breakpoints. But did you know you can set variable breakpoints too? With a variable breakpoint you can cause execution to pause when a specified variable becomes equal to a given value.

You will find the “Variable Breakpoints” option under the “Debug” menu in the code editor.

You can set one or more variables and values. Then at any point during execution when one of those conditions occurs the macro will pause and allow you to debug.

This can be very useful when you are not sure where an issue is occurring but you may know that a specific set of data causes a problem that you want to debug.

November 27, 2015

BlackFriday Deal

Filed under: Uncategorized — Marcus Tettmar @ 8:57 am

So it’s Black Friday. Sounds so gloomy. A day where many appear to go mad and gorge.

There’ll be no extra discounts from us today, but what we will do is donate 10% of today’s sales to The Woodland Trust and St Mungo’s charity for the homeless.

So if you buy or upgrade Macro Scheduler today, or renew your maintenance you’ll be planting some much needed trees and providing for people who really need stuff. 🙂

November 24, 2015

Finding HTML Attributes For Automating Web Sites

Filed under: Automation, Scripting, Web/Tech — Marcus Tettmar @ 1:00 pm

If you’re new to automating IE/websites with WebRecorder or the native Macro Scheduler IE functions you may be wondering how to determine which elements and attributes to use.

In this video I demonstrate how to use IE’s F12 key to invoke Developer Tools and use that to quickly find the elements we’re interested in and the attributes we need to use:

(You might want to click on the video toolbar to select a larger resolution size, view full screen or view on YouTube so that you can see the code).

November 13, 2015

Macro Scheduler Gearhead Spotted Again in Forza

Filed under: Announcements, General — Marcus Tettmar @ 8:49 am

Thanks again to Chris Henwood for designing another stunning livery. This time for this virtual Aussie V8 Dorian is driving in Forza Motorsport:

Aussie V8 with MJT Livery

Dorian is racing this car twice a week. Good luck Dorian!