PTFB Pro for Power Users Archive

How to Share Macros Between Networked Computers

In office environments it may be desirable to have several installations of PTFB Pro loading their items from a single, shared file. That way, when one of more of those items need to change, only a single file need be updated.

PTFB Pro allows you to export a set of items to a special file held in a shared area, and tell all copies of PTFB Pro to load items from that file. Updates to the file can be picked up automatically if required. Each user is still free to create their own private items.

Here’s how …

    1. Export the items you wish to share to a separate file. This done through the “Export items to file” command in the Options menu, and produces a .ptfbx file which you should place in a suitable shared location.
    2. Next you have to tell all the other copies of PTFB Pro to load items from the .ptfbx file. This is most easily done in the “Shared File” page of PTFB Pro’s configuration screen.

First tick “Use shared file”, then either browse to the file or enter its path directly. Next, set the name of the tab which should receive the shared items. If desired, you can also set PTFB Pro to periodically check the nominated file for changes and reload it if required.

A few points to note about the shared file:

  • The items imported in this way are considered “on loan” and are therefore not editable, though you are free to duplicate them and edit the duplicates.
  • You can disable and even delete shared items, but if “Reload updates automatically” is set and the shared file is updated, the items will automatically revert to their original state.
  • The user is not limited to the shared items; they can create and modify their own items.

Find out more about boosting your productivity with autoclicks and macros.
CLICK HERE to download a free 30 day trial, no strings attached. If you aren’t entirely happy simply uninstall!

The Role of “Skip Redundant Mouse Movement” In Macro Playback

If you take a look at any screen or window-based macro you’ve recorded in PTFB Pro, you’ll see a checkbox marked “skip redundant mouse movement” on the first page of its property sheet.

So what does it do? Why is it so important in macro playback?

Basically, any time you record a macro all mouse movements are preserved in that recording. When you drag your mouse from one side of the screen to the other, you aren’t just going directly from A to B, you’re taking your mouse cursor on a journey with hundreds, maybe thousands of little “course corrections” along the way.

Now if you’re recording a macro to duplicate a drawing operation for example, all those little mouse movements are important and you want to keep them. On the other hand, if you’re just carrying out a regular computing task, like moving the mouse over a button and clicking, those mouse movements are pretty much irrelevant; all that matters is that the mouse is in the right place when the click occurs. What’s more, if you want your macro to play back at maximum speed, you’re better off ditching all those redundant mouse movements entirely. That’s exactly what “Skip redundant mouse movement” does; when the macro plays with the skip option enabled, it’s as though all the unimportant changes in mouse position aren’t there. The result? More efficient  playback that consumes less computer horsepower (cpu utilization).

The real beauty of this option is that it doesn’t actually delete the excess mouse movements from the macro, never to be seen again; instead it simply skips over them. So, anytime you want the macro to play back exactly as it was recorded, you just untick the button and move the playback speed to the middle position.

Find out more about boosting your productivity with autoclicks and macros.
CLICK HERE to download a free 30 day trial, no strings attached. If you aren’t entirely happy simply uninstall!

Access common windows functions by hotkey

I bet there are some Windows operations you perform regularly like flushing Internet Explorer’s cache, visiting the Add/Remove programs screen (aka “Programs & Features” in Windows 7), changing folder options, tweaking the firewall’s whitelist etc. Using PTFB Pro’s macro recorder you can get access to some of these functions a whole lot faster than you might think.

Here’s an example. Let’s say you want to flush IE’s cache of temporary files:

  1. Create a screen based macro in PTFB Pro, and quit recording immediately by hitting the Pause/Break key.  That’s right – you’re not going to simply record the action of going to the Start Menu, selecting Internet Options in the control panel and digging through IE’s screens. There’s a faster way!
  2. Open the macro you’ve just created. Give it a meaningful name on the first page, then switch to the Triggers page. Turn off “Trigger spontaneously” and click on “Hotkey”. Choose the hotkey combo you want to use for this action, and switch to the Editing page.
  3. On the Editing page, delete any existing actions and add a “Run Executable” item. Type (or copy paste) the following line into the command line box: RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
  4. Click OK to save your changes and you’re done!

You can use the same technique for a lot of other operations, just by changing the command line you use in step #3. Below there’s a list of the more common ones on Windows 7, but a bit of Googling will no doubt find you more. Also, bear in mind that this can be just the starting point for much more powerful actions.  For example, you could define a macro that uses a RunDLL command to bring up a screen, then create another macro to carry out a specific operation on that screen, then create a third “wrapper” macro that runs both the other two in sequence in response to an entirely different hotkey.

Some more RunDLL command lines for Windows 7

Content Advisor
RunDll32.exe msrating.dll,RatingSetupUI

Control Panel
RunDll32.exe shell32.dll,Control_RunDLL

Date and Time Properties
RunDll32.exe shell32.dll,Control_RunDLL timedate.cpl

Display Settings
RunDll32.exe shell32.dll,Control_RunDLL desk.cpl

Device Manager
RunDll32.exe devmgr.dll DeviceManager_Execute

Folder Options – General
RunDll32.exe shell32.dll,Options_RunDLL 0

Folder Options – Search
RunDll32.exe shell32.dll,Options_RunDLL 2

Folder Options – View
RunDll32.exe shell32.dll,Options_RunDLL 7

Forgotten Password Wizard
RunDll32.exe keymgr.dll,PRShowSaveWizardExW

Flush IE’s Temporary Internet Files:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8

Flush IE’s Cookies:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2

Flush IE’s Browsing History:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1

Flush IE’s Stored Form Data:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16

Flush IE’s Stored Passwords:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32

Full IE browsing cleanup:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255

Full IE browsing cleanupfiles inc settings stored by Add-ons:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351

Hibernate
RunDll32.exe powrprof.dll,SetSuspendState

IE Favourites
Rundll32.exe shdocvw.dll,DoOrganizeFavDlg

Keyboard Properties
RunDll32.exe shell32.dll,Control_RunDLL main.cpl @1

Lock Screen
RunDll32.exe user32.dll,LockWorkStation

Mouse Button – Swap left button to function as right
Rundll32 User32.dll,SwapMouseButton

Mouse Properties Dialog Box
Rundll32 Shell32.dll,Control_RunDLL main.cpl @0,0

Map Network Drive Wizard
Rundll32 Shell32.dll,SHHelpShortcuts_RunDLL Connect

Network Connections
RunDll32.exe shell32.dll,Control_RunDLL ncpa.cpl

Open With Dialog Box
Rundll32 Shell32.dll,OpenAs_RunDLL Any_File-name.ext

Power Options
RunDll32.exe Shell32.dll,Control_RunDLL powercfg.cpl

Printer Management Folder
Rundll32 Shell32.dll,SHHelpShortcuts_RunDLL PrintersFolder

Programs & Features, aka Add/Remove programs
RunDll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,0

Region and Language Options
Rundll32 Shell32.dll,Control_RunDLL Intl.cpl,,0

Safely Remove Hardware Dialog Box
Rundll32 Shell32.dll,Control_RunDLL HotPlug.dll

Sound Properties Dialog Box
Rundll32 Shell32.dll,Control_RunDLL Mmsys.cpl,,0

Stored Usernames and Passwords
RunDll32.exe keymgr.dll,KRShowKeyMgr

System Properties – Advanced
RunDll32.exe shell32.dll,Control_RunDLL sysdm.cpl

System Properties – Advanced
Rundll32 Shell32.dll,Control_RunDLL Sysdm.cpl,,3

Taskbar Properties
RunDll32.exe shell32.dll,Options_RunDLL 1

User Accounts
RunDll32.exe shell32.dll,Control_RunDLL nusrmgr.cpl

Unplug/Eject Hardware
RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll

Windows Security Center
RunDll32.exe shell32.dll,Control_RunDLL wscui.cpl

Windows – About
RunDll32.exe SHELL32.DLL,ShellAboutW

Windows Firewall Options
RunDll32.exe shell32.dll,Control_RunDLL firewall.cpl

Windows Fonts Folder
Rundll32 Shell32.dll,SHHelpShortcuts_RunDLL FontsFolder

Find out more about boosting your productivity with autoclicks and macros.
CLICK HERE to download a free 30 day trial, no strings attached. If you aren’t entirely happy simply uninstall!

How to mute the sound in Windows by hotkey

Many modern keyboards have a special key for muting/unmuting the sound in Windows, but if yours doesn’t, you can create the next best thing with a PTFB Pro macro and a couple of lines of script. Here’s how to go about it.

Stage 1 – create mute/unmute script

The first stage is to create a little “.vbs” script that will toggle the sound on/off. Just open up Notepad (or your favorite text editor) and paste in the following two lines of text:

Set oShell = CreateObject("WScript.Shell")
oShell.SendKeys(chr(&hAD))

Save the file somewhere convenient, with the .vbs extension. For example, I called mine “Mute.vbs” and popped it in my documents folder. Double-click it a couple of times just to make sure it works and you haven’t made a typo anywhere.

Stage 2 – create PTFB Pro macro and bind to hotkey

OK, now we’ve got our script, we’re going to create a PTFB Pro macro to run it, and bind that macro to a hotkey.

  1. Create a new screen based macro and stop recording immediately by hitting the Pause/Break key.
  2. Open the new macro for editing. On the General page, give it a meaningful name (e.g. “Mute”).
  3. Switch to the Triggers page and turn off “Trigger spontaneously”. Now tick “Hotkey” and choose a memorable hotkey combination for the mute function. CTRL + SHIFT + M sounded good to me.
  4. Switch to the Editing page. Clear out any existing recorded actions and add just a single “Run Executable” item. For the command line, type in “cscript” followed by a space, followed by the full path to the vbs file you created earlier. If the path contgains spaces, remember to surround it with double quotes.

MuteCmdLine

That’s it. Your chosen hotkey will now execute the vbs file, toggling Windows audio between its muted and unmuted states.

Find out more about boosting your productivity with autoclicks and macros.
CLICK HERE to download a free 30 day trial, no strings attached. If you aren’t entirely happy simply uninstall!

Speeding up macro creation in PTFB Pro 4

In PTFB Pro 4′s default configuration, creating a macro is a two-step process. You press “New Macro” then select the macro type from the resulting screen, or press the right hand side of the New Macro button then choose from the resulting popup menu.

If you typically create a particular kind of macro, you can speed up the process via the “Configure…” screen as follows:

New Macro Button Action

  1. Use Options -> Configure to bring up the Configuration screen.
  2. In the “Presentation” screen, locate the entry marked “Default action for New Macro button”. There’s a drop-down list next to it – choose the option you use most from the list.
  3. Hit Close to save changes.

Now the “New Macro” button is dedicated to creating the macro type that you chose, e.g. Window Restore as in the following screenshot:

New Macro Action Winrestore

Note that you can still create other macro types by clicking on the drop-down part of the button (right hand side) and choosing from the resulting menu.

Find out more about automating your workflow with Macros.
CLICK HERE to download a free 30 day trial, no strings attached. If you aren’t entirely happy simply uninstall!

Windows Automated Tray Icon Hiding and PTFB Pro

About the System Tray Icon

PTFB Pro places a mouse-shaped icon in your system tray when it is running. This icon has a small “x” when PTFB is disabled, and its color changes from blue to red (see below) when a macro is playing or when an automated action is about to run.


Normal, disabled and playback/countdown versions of PTFB Pro’s tray icon.

Clicking on the icon with the left mouse button opens up PTFB Pro’s main window. Right-clicking on the icon brings up a small menu of handy operations.

Windows Automated Tray Icon Hiding

Starting with Windows XP, Microsoft included a feature that hides tray icons to reduce clutter. This feature is particularly aggressive in Windows 7, where a new tray icon is displayed for less than a minute before it is hidden, never to be seen again unless you explicitly tell Windows not to hide it. It’s easy to check whether Windows has hidden PTFB Pro’s icon – just click on the little arrow near the right edge of your taskbar. If you see PTFB Pro’s mouse-like icon in the resulting popup window then yep, Windows has hidden it.

There are different ways to tell Windows not to hide PTFB Pro’s icon depending on the version of operating system you’re running.

Windows 7

There are actually several ways to make sure PTFB Pro’s icon is shown under Windows 7, but the easiest is:

1. Click on the “Show Hidden Icons” arrow on the taskbar
2. Click and drag PTFB Pro’s icon out of the resulting popup window and into the notification area of your taskbar.

Vista

1. Right click in the task bar and choose Properties.
2. Switch to the Notification Area tab
3. Click “Customize…”
4. Find PTFB Pro’s icon in the list, set its behavior to “Show” and hit the OK button.

Find out more about automating your workflow with Macros.
CLICK HERE to download a free 30 day trial, no strings attached. If you aren’t entirely happy simply uninstall!

Enabling macros to work even when Remote Desktop is closed or minimized

Remote Desktop is a real boon to many Windows users. It’s free, and it lets you control a PC in another location without have to leave your seat. Unfortunately, as many people have found,  strange things happen when you minimize the remote window or close it without formally disconnecting the session; the remote copy of Windows suddenly stops responding to the mouse and key presses generated by macro recorders – PTFB Pro included.

Happily PTFB Pro now includes a workaround for this. All you have to do is turn it on:

1) Open up PTFB Pro and choose Options -> Configure to bring up the configuration screen

2) Tick the option marked “Disconnect inactive Remote desktop sessions”

Enable RDP workaround

3) Hit Close, and you’re done

So what does this option do?

When the option is ticked, PTFB Pro is able detect when it’s running in a remote desktop session that has become inactive – in other words, that the RDP window has either been closed or minimized. It still doesn’t take any action at this point – not until it spots something that requires its attention. This might be a macro that has to run, or a button that needs to be pressed, but whatever the cause, when PTFB Pro realizes that it has to take action, it disconnects the remote session. As soon as that happens, the remote copy of Windows stops ignoring mouse and key presses and PTFB Pro is able to carry out its work.

It’s important to note that the disconnection never happens while you’re working with the remote PC! It only happens when the connection has become inactive because you’ve either closed or minimized the remote window. Obviously if you subsequently want to check in on the remote PC you have to reconnect, but better that than discovering that an important task has been held up for a few hours because the connection went inactive!

Notes For Windows 7

Behind the scenes PTFB Pro uses the TSCON command to kick the inactive remote desktop session back to the console. Under Windows 7 the TSCON command can only run with full (elevated) privileges. Consequently PTFB Pro’s attempts to use the command will be ignored by Windows. There are two ways to get round this.

1) You can disable User Account Control (UAC). This is not recommended as it weakens Windows 7′s inbuilt security somewhat, but it does allow PTFB Pro to execute TSCON correctly and eliminates a number of Windows prompts. The choice, and the associated risks, are yours to take.

2) Alternatively, you could create a small .bat file that includes the following command line:

tscon 1 /dest:console

Create a shortcut to the .bat file and in the Compatibility page of the shortcut’s properties set the option labelled “Run this program as an administrator”. Use the shortcut to exit the remote session whenever you want PTFB Pro to be able to continue handling targets. Note however that Windows will ask you for permission for this each time.

Find out more about boosting your productivity with autoclicks and macros.
CLICK HERE to download a free 30 day trial, no strings attached. If you aren’t entirely happy simply uninstall!