Sending a FAX with HomeVision

HomeVision and HomeVision-Pro can perform many different actions if you leave them connected to a running computer. One useful function is to send a FAX when an important event occurs. HomeVision does not contain any built-in FAX capabilities; instead, it uses your FAX software by sending the appropriate commands to it.


HomeVision has a variety of commands to support sending a FAX:

bulletRun program "program.exe"
bulletActivate window "window name"
bulletSend keys "keystrokes"

You should review the HomeVision documentation for these commands so you understand them thoroughly before proceeding. With these commands, the controller can perform just about any action you can with the keyboard. There are two different ways to use these commands to send a FAX:

bulletUse these commands to send all the needed keystrokes directly to the FAX software.

bulletUse a software "macro" or "batch file" program. These programs can be configured to perform a sequence of actions. Common capabilities include running programs, activating windows, sending keystrokes and mouse movements, waiting for a previous action to complete, and much more. Many of these are available as shareware or even freeware. You could use one of these programs and configure a macro to send the desired FAX. Then, have HomeVision send a single command to run the macro. This approach is more powerful than the first approach because these programs typically provide more commands than HomeVision to control the FAX program.

No matter which approach you choose, you will need to determine the correct sequence of commands needed to send the FAX. The required commands (or keystrokes) will vary greatly depending on your FAX software and how your computer is configured. The best way to determine them is by sending a text FAX with your software and making a record of all the keystrokes required. Here are some tips:

bulletIt usually works best to keep your FAX software running all the time. This way HomeVision does not need to start and stop it. This simplifies timing of the commands, as there's no need wait for the program to start before sending the next commands. You should put the FAX software in your Windows startup folder so it starts itself automatically.

bulletIn your HomeVision schedule, put all the commands in a macro. Then you can easily test the macro by having it run when you receive a certain X-10 or infrared signal.

bulletTest the commands under all possible conditions to determine which may not work properly. For example:

bulletDoes it work OK if the FAX application is minimized? The "activate window" command selects the program icon, but doesn't open it. It stays minimized and subsequent keystrokes don't always work as expected. Some programs allow you to restore or maximize the window with keystrokes. For example, Microsoft Word uses the keys Alt-F5 to restore the window and Alt-F10 to maximize the window. To determine if your program can do this, minimize the window, then click on the icon. A popup window will appear that shows the available keystrokes. If available, you can send these keystrokes after using the "activate window" command to restore the window, then proceed with the rest of the keystrokes.

bulletWhat happens if the program isn't running? If you don't start it, it obviously won't send a FAX. However, will something else improper happen instead? If another program is open, the keystrokes could cause it to do something you didn't intend.

bulletWhat happens if the phone line is busy? Most FAX programs will automatically redial several times, so this usually isn't a problem.


horizontal rule

What to FAX

There are two different ways to send information via FAX:

bulletFAX a file:

With this method, you have a file containing the desired information already on the computer. You then tell the FAX software to FAX this file. But how do you create this file? One approach is to create in advance a variety of files each with a different message. One file might be a simple text file reading "Burglar alarm is going off at your house!". Another might be a graphics file containing a fancy picture of your home, along with the message "Water has been detected in the basement". Another approach is to use HomeVision's capability to create text files and write text to them. In this way, the file could contain variable information, such as "The indoor temperature has dropped to 40 degrees !". You could even have HomeVision log all serial messages to a file, then FAX the complete log file.

bulletEnter the information enter into the cover sheet:

Many FAX programs allow you to include text messages on the cover sheet. You can use HomeVision's "send keys" command to write the desired message.


horizontal rule


These examples assume you leave your FAX software running all the time, which is our recommended method. However, if you don't, you can use a command such as this to start it:

   Run program "C:\programs\FaxTalk\FaxTalk.exe" 

Example 1

This example shows how to FAX a file using the QuickLink software supplied with some U.S. Robotics modems. The controller sends commands to the QuickLink program to FAX a file named "Alarm.txt", which already exists on the computer.

Step 1 - Activate the FAX software window

You need to activate the program window so that subsequent keystrokes are sent to it. Here's the command:

   Activate window "QuickLink"                  

Step 2 - Send keystrokes

Now you send all the keystrokes needed to send the FAX. The notes at the end of each line explain what each command does.

   Send keys "%+S"                            (selects New FAX from menu)
   Send keys "c:\Alarm.txt{ENTER}{ENTER}"     (specifies file name to FAX)
   Send keys "5551234"                        (number to send FAX to)
   Send keys "{TAB}John Doe"                  (name of FAX recipient)
   Send keys "%S"                             (sends FAX now)                

These commands work with QuickLink; your program will likely be different. You should also note that you could put all these keystrokes in a single "send keys" command. However, spreading them out as done here makes it a little easier to understand what it's doing.


Example 2

This example shows how to send a FAX using the FaxTalk For Windows software. The controller sends commands to the FaxTalk program to FAX a preset coversheet which includes a comment field where new text can be added.

Step 1 - Activate the FAX software window

You need to activate the program window so that subsequent keystrokes are sent to it. Here's the command:

   Activate window "FaxTalk"                  

Step 2 - Send keystrokes

Now you send all the keystrokes needed to send the FAX.

   Send keys "%FW"                       (selects New FAX from menu)
   Send keys "%N"                        (moves to "Phonebook Names" field)
   Send keys "{UP}"                      (selects first entry as recipient)
   Send keys "%A"                        (selects "Add to recipient list")
   Send keys "%E"                        (opens "Edit Cover Sheet" window)
   Send keys "{TAB}X"                    (selects template file "X")
   Send keys "{TAB 7}"                   (7 tabs to reach "Comment" field)
   Send keys "The alarm is going off"    (enters comment)
   Send keys "%O"                        (selects "OK" and closes window)
   Send keys "%S"                        (sends FAX)                

Note two things about this FaxTalk procedure:

bulletWe're selecting the recipient from a "phonebook" using a list box. It is difficult to select a desired entry with only keyboard strokes, as typing the recipient's name does NOT work. Instead, we simply select the first name from the list. You should therefore set up the phonebook so the first entry is the correct destination. You should also choose a name for the entry that will always be first in the alphabetical list (perhaps by starting it with an underscore character). Otherwise, you might later add a phonebook entry at the top of the list, and they receive your HomeVision FAX!

bulletFaxTalk uses coversheet templates that contain information you would otherwise enter manually. This example selects template "X", which was preset with text indicating that HomeVision is the FAX sender. We then enter a specific message in the comment field.


Example 3

EtCetera is a useful shareware program that performs "batch" commands to control other programs. Listed below is an EtCetera batch file that sends a FAX using QuickLink. This is very similar to example 1, except here EtCetera controls the QuickLink software instead of HomeVision doing it directly.

   ;Start QuickLink. If it's already running, this will activate it:
   ;Wait 5 seconds for it to start up:
   Wait 5
   ;Select the "Send FAX" command from the menu (by entering Alt-Shift-S):
   SendKeys "/A/SS"
   ;Enter the file name to FAX, including its path:
   SendKeys "c:\alarm.txt"  
   SendKeys "{ENTER}{ENTER}"
   ;Enter the phone number and recipient's name:
   SendKeys "5551234"
   SendKeys "{TAB}John Doe"
   ;Finally, send the FAX (by entering Alt-S):
   SendKeys "/AS"                

Once you create the batch file (a simple text file), HomeVision can run it with a single command. For example, if the batch file name is "sendfax.etc" and the EtCetera program is named "Etc_130.exe", you would use this command:

   Run program "C:\Etc_130.exe sendfax.etc"                  

There are several advantages to having EtCetera control the FAX process instead of HomeVision:

bulletEtCetera's "Run" command works regardless of whether QuickLink is currently active, minimized, or not running at all.
bulletWait statements in the batch file are easier to use than putting them directly in your HomeVision schedule.
bulletYou can modify the batch file at any time without having to reload the HomeVision schedule.

EtCetera and other similar programs are available at many shareware sites on the Internet.

Back Up Next

Last updated:
01 October 2013

Copyright 1996-2013, all rights reserved, by:
Custom Solutions, Inc.
1705 Canterbury Drive, Indialantic, FL 32903

HomeVision is a registered trademark of Custom Solutions, Inc.