Monday, April 25, 2011

Auto Band Changing with SkimSrv and the QS1R

One of the limitations of using SkimSrv (Skimmer Server) with the QS1R receiver is that you can only monitor 7 bands at a time. Yes, only - because if you want to cover 80 and 160 at night, and 12 and 10 during the day, or listen for sporadic E on 6, then you have to remember to change the band selections in Skimmer Server.

Because I keep forgetting to do this manually, I wanted a way to make changes automatically. Following is my simple-minded solution.

1. Download AutoHotkey and install it on your computer.
2. Use Notepad to view and store these two scripts. Be sure to give the file-names the extension .ahk so that Windows will know to run AutoHotkey when you double-click on the scripts.

To start 12 and 10, disabling 160 and 80:

;This script will tell SkimSrv to stop listening on 80 and 160, and to start listening
; on 12 and 10
winActivate Skimmer ;tells Windows to apply the following in the SkimSrv window

Click 73, 35 ; select the Skimmer tab

Click 34, 178 ; click on 160 to deselect it

Click 34, 162 ; click on 80 to deselect it
Click 37,297 ; click on 12 to select it
Click 33, 277 ; click on 10 to select it

Click 290,438 ; click on Apply
Click 27, 42 ; Select the Status tab

Similarly, to start 80 and 160, disabling 12 and 10

;This script will tell SkimSrv to stop listening on 12 and 10 and to start
; listening on 80 and 160
WinActivate Skimmer ; makes sure that the following apply to the SkimSrv window
Click 82,36 ; Select the Skimmer tab
Click 37,297 ; shut down 10
Click 33, 277 ; shut down 12
Click 34, 178 ; start 80
Click 34, 162 ; start 160
Click 290, 438 ; Click Apply
Click 28,32 ; select the Status tab

It's probably obvious, but what we are doing here is telling the cursor to go to a location in the SkimSrv window and then click there. Because the locations are defined in relation to the window, and because the window cannot be re-sized, this works wherever the window is on your screen, but it must be open when the script is activated.

I figured out what coordinates to show in the Script by using the AutoIt Windows Spy which comes with AutoHotkey

Once you have the two scripts stored, double-click each one to make sure it does what you intend. Once things are working, you can customize the scripts for your own particular needs. Incidentally, it is critically important that you leave a space before the ";" that denotes a comment, when the comment is in-line with a script command. Otherwise, AutoHotkey will try to run what appears after the semi-colon.

Now, go to All Programs>Accessories>System Tools>Scheduled Tasks, and set up your scripts to run every day when you want them to. The only trick here is that the account from which you run the Task Scheduler must have a password - blank will not work. Set the same password for each script.

Now I have no excuse for forgetting to switch band coverage!

73, Pete N4ZR