Controlling Applications With Keyboard Macros

Tutorials Add comments

This article describes how to control other applications with keyboard macros using Vectir. The instructions assume you are remotely controlling your PC from a mobile phone running Vectir mobile. If you are using IR remote control, skip steps 1 and 3.

1. Install or locate Profile Template

To help you get started, we have created a profile template that can be customised for the application you wish to control. If this was included with your Vectir install, it will be found in the Keyboard macro profiles group of your phones group in the Configuration panel. It’s name will include the text “Profile Template”. If the template is missing, you can download it from the Remote Profiles Download Page.

2. Setup Keyboard Macros

Drag the Keyboard macro command from the Setup panel into the Key Commands group of the Profile Template. Alternatively, you can use the “Add selected item to configuration” button under Setup Options. If you’re using IR Remote control, you can add the command to your own custom group.

Keyboard macro command

The Keyboard command setup dialog should now be displayed. Enable the options for “Launch application if not running” and “Always focus application window”. See below:

Key command dialog options

The next step is to locate the process name of the application you wish to control. Click the Find Process Name button to launch the Find Application Process dialog:

Find application process

Select the process name of the application you wish to control. Your application will need to be running before the process name will show up. In this example and for the remainder of the article, we will be controlling Windows Media Player. After you have selected the correct application process name, click the OK button. The process name should now be visible in the process name text box on the Keyboard command setup dialog.

Now its time to record the keyboard macro keystrokes. This is a simple three step process:

  1. Click the Record button
  2. Enter the keystrokes on your keyboard just as you would for the application
  3. Click the Stop Recording button

The keystrokes you entered should now be visible in the text box beneath the Record button. In the following example, Ctrl+P has been recorded. This is the keyboard shortcut for the Windows Media Player Play/Pause command.

Key command record

The keyboard macro is now successfully recorded. Click the OK button to close the Keyboard Command setup dialog and save your macro command. It should be visible in the Key Commands group of the Profile Template. Select the command then press F2 and rename it to match the application function that it controls. In the following example, the keyboard macro command has been renamed for the WMP Play/Pause command.

WMP Play Pause command

You have now successfully setup the keyboard macro command! Repeat all instructions under step 2 for any other keyboard shortcuts you need to control in your application.

3. Customise the Remote Profile Design

This step describes how to customise the remote profile design for the application you wish to control.

The first thing to do is rename the profile template for the application you wish to control. Click the profile template, press F2 and enter an appropriate name. In the following example, the profile template has been renamed to “WMP Keyboard Control”.

WMP Profile Name

Now right click on the profile and select Edit from the context menu. This will load the remote profile designer.

Rename the profile title by clicking on the text box that says “Profile Title”, locate the Text property in the Properties window and replace the existing text with the correct name for the profile. When you press Enter, the text box will update to show the text you entered.

You will also need to rename the command text boxes for the keyboard macro commands you setup. For example, replace “Command 1 = Key name” with “Play/Pause = Select” where Select is the name of the phone key that will control the Play/Pause command. The phone keys will be mapped to each command in step 4 below.

The following example shows a profile edited for Windows Media Player:

WMP Profile Design

Click the Save and Close button when you have finished.

4. Map Phone or Remote Control Keys to the Macro Commands

The final step is to map keys from your mobile phone or remote control to the macro commands you have just setup. This process is described in the
How to Map Custom Keys to Commands tutorial. You can skip step 1 since the commands are already setup.

Tags: , , , ,

Comments are closed.