PTFB’s Visual Trigger Up Close

It’s time to take a closer look at one of the major new features in PTFB Pro version 5 : Visual Triggers.

Simply put, they allow PTFB to react to a change on screen that is visible to the eye, but is otherwise not detectable. Examples include a change in color, in wording, or in a graphic.  Visual change triggers are available for single clicks / presses and for all of PTFB’s macro types, including”ProgMons” which are used to handle launching, suppression and automatic restarting of other programs on your Windows PC.

To use the new trigger type, you need to open up your macro for editing (just double-click it on PTFB Pro’s main screen) then switch to the Triggers tab. The option you’re looking for is the checkbox labelled “Visual Change” in the top left of the “Other Triggers” section:

Visual Change - Triggers Page

Tick this new trigger type or press the “Change Settings…” button next to it to open up a new screen where you can set the specifics: what part of the screen you want to monitor, and what kind of changes will be enough to cause your macro to run. Let’s take a look at that settings dialog now:

Trigger on Visual Change - Settings

The first section of this dialog defines which part of the screen should be monitored for changes; you do this by press the button marked “Choose Area”. Your mouse cursor will change to a little grey-bordered box; simply move that box over the target area and click the left mouse button to select it (or click the right mouse button / press the “Esc” key to abort). For performance reasons the largest area you can monitor is a 32 x 32 pixel square; you can narrow this to a smaller area (16 x 16 or 8 x 8) at any point if you wish. PTFB Pro will indicate whether the area you’ve chosen is a part of the screen as a whole, or a part of your target window if you’re editing a single-press item or window-based macro. At the instant you click to set the area, PTFB Pro takes a snapshot of the region as it is right now. You get to choose if and how this snapshot will be used in the section titled “Conditions For Trigger”.

The first choice in the Conditions section is whether to react to a difference or a match; the “Match” case is useful when the monitored area changes routinely but you only want the press or macro to run when it’s a reasonable match to the snapshot you just recorded.

Next – if you’ve chosen to trigger on “Difference” – you can choose whether comparisons will be made against the fixed snapshot you made earlier, or against a so-called “Dynamic” snapshot. If you want PTFB Pro to react each and every time the monitored area changes then you should choose “Dynamic”, otherwise just go for the “Fixed snapshot” option.

Finally there’s a slider that lets you fine-tune the sensitivity of the visual trigger. The effect of this depends on whether you previously chose to trigger on a “Difference” or a “Match”. When looking for a difference, the left hand side of the slider represents maximum sensitivity; PTFB Pro will run the macro in response to any detectable change. As you move the slider to the right, PTFB Pro requires a more substantial change before the macro runs. The slider effect for “Match” works the other way around; the left hand side requires an almost exact match with the snapshot, but as you move it to the right, an increasingly less perfect match will be enough to trigger your macro.

I should take a moment here to note the link between the effect of the slider control and the area size that you choose. A small change in the largest (32 x 32 pixel) area size might only rack up a difference value of say 8%. However, if you drop that to the smallest area size (8 x 8) then that same small change becomes more significant. Remember that phrase “small fish in a big pond” : the same principal applies here.

To make it easy to tune all these settings and ensure that you’ll get the effect you want, the Visual Change Settings screen has a button marked “Test Now”. Press it, and PTFB Pro will tell you exactly how much of a change it sees, and whether it would be enough to trigger your macro.

So that’s the lowdown on the new Visual Change trigger-type in PTFB Pro; the next post will focus on some of the other new features in version 5. Don’t forget you can try PTFB Pro right now by downloading the free 30-day trial.