Perseus Autohotkey Schedule for Perseus.exe 2.1f
------------------------------------------------


As I see my first Autohotkey-Script for the Perseus is still in use.
So I will add a newer Version with extended features:

- The script must not be altered anymore. Your directories and settings
  will be set in a configuration file "PerseusSchedule.ini" and the current
  Schedule should go to a schedule-file with a name and filetype of your choice.
  
- The script accepts now starttime and stoptime in UTC instead of local time

- There a lot of checks if configuration file and the schedule is correct or not.



How to set up the new PerseusSchedule script
--------------------------------------------


- Create a directory for the ScheduleScript stuff, say it is
  C:\Programs\Perseus\Schedule
  
- Copy the content of the .zip Archive into this directory.

- Edit your PerseusSchedule.ini File

- Write a Schedule and run it.



How to change the PerseusSchedule.ini
-------------------------------------

It looks like that. Use a plain-text editor as notepad or Uedit 
to make your changes.


[Files]
PerseusExe=C:\Programs\Perseus\perseus.exe
PsKillExe=C:\Programs\Sysinternals\pskill.exe
WaveRoot=C:\Temp
ScriptRoot=C:\Programs\Perseus\Schedule
[Limits]
RunWarning=180
PauseWarning=180
[LastUsed]
ScheduleFile=c:\TEMP\perseus_schedule.txt

PerseusExe - Set it to the location of your current Perseus-Version. 

PsKillExe -  Set it to the location of the pskill.exe. If you did use the 
old Autohotkey-script you have it already installed and you can reuse it.
Else load it from http://download.sysinternals.com/Files/PsTools.zip  
and unpack the zip-archive into a directory eg. C:\Programs\Sysinternals
You need the pskill.exe to kill hanging processes. 

WaveRoot - Set it to the directory where you want to store yor recorded files.
It may be on a different disk or partition than the program files.
Every time when PerseusSchedule is executed it will create a new subdirectory
and store in that subdirectory all files for the scheduled recordings.

ScriptRoot - Set it to a directory where you indend to store your schedules

RunWarning - Your schedules will be carefuly checked before running. If you have
planned a recording, that will be longer than the value of RunWarning a
warning will appear. You can run the schedule  anyway. RunWarning=180 would
cause a warning when a recording would be longer than 3 hours.

PauseWarning - Similar to RunWarning. Will warn if the Perseus is more than the amount
in minutes without work. See the chapter "How to write a schedule". PauseWarning=180
will cause a Warning e.g. when a schedule entry ends at 2000 and the next starts at 2315.
You can run the schedule anyway. 
Both warnings should prevent you from typos and copy-and-paste error when writing a schedule

ScheduleFile - Need not to be altered. The script will store here the location of the last 
executed schedule.

If you made a wrong change in the .ini-file the reaseon will be reported.

How to write a schedule
-----------------------

Example:

My current script for NDB DXing is the following


370,200,2110,2120,370x21,go for new ndbs
565,200,2121,2131,565x21
370,200,2210,2220,370x22
565,200,2221,2231,565x22
250,100,2322,0032,250x23
370,200,0100,0110,370x01
565,200,0111,0121,565x01
250,100,0122,0132,250x01
370,200,0200,0210,370x02
565,200,0211,0221,565x02
370,200,0300,0310,370x03
565,200,0311,0321,565x03
;320,200,0415,0455,320x04,this is a comment and wont be executed
Shutdown

The first column contains the center frequency in kHz.it must between 50 and 30000.

The second contains the width of recording. It must be 100,200,400,800 or 1600.

The third column contains the starttime in UTC. You must provide it with 4 digits.

The fourth column contains the endtime in UTC. You must provide it with 4 digits.

The fifth colum contains the filename. You must (!) provide for each line a different
name. This  will not be checked. If you have a name twice, the first recording will be overwritten
(Will change that in future.) The filename can have a maximum of 8 characters. You can use
letters or digits but no other special characters as "_" etc.

Optionally you can write a comment for your own after the filename.

The schedule parameters must be separated with "," as shown above. Else the number
of parameters can not be recognized.

The recordings must be written in ascending order by starttime. Between the
end of a recording and the start of the next recording let at least 1 minute delay!

The last line should be "Stop" if you want to let the PC run or "Shutdown" as shown above
when you indend to switch the PC off.

You can decactivate a line setting a ";" as first character.




How to start a schedule
-----------------------

Start  the PerseusSchedule.ahk  Enter the
filename and the full path of your schedule and click OK. Your schedule will 
be listed in a listbox. If notations are OK "No Warnings or Errors" will appear.
Start the execution with OK and do not use the PC a times where Autohotkey
is scheduled to make the necessary mouseklicks untile the recordings are finished.

If there are errors or long recordings / long delays in your schedule an error or
warning will appear. In case of warnings you can decide to continue with OK or to
break the execution with CANCEL. In case of errors you can press what you want, the script
will exit. You can start it again after you made a correction of errors.

If the current time is greater than the starttime of the schedule a warning will appear.
You can press OK to wait until the next startpoint has come or you can press CANCEL and
then as much as needed schedule entries will be skipped until one with a starttime > current time
is found.

You can make a icon for the the PerseusSchedule.ahk or the PerseusSchedule.exe


Known Problems
--------------

The provided scripts works on my configuration since several weeks without any error.
If you want to modify it you can compile it to an .exe file with the Ahk2Exe Compiler.
Be aware, that you can get a virus warnig during the compilation. This is a wrong alert and you can ignore it,
Autohotkey uses some methods for window-tracking and controlling which can be used as hacker tools too.
Therefore the  virus alert is OK here.


I hope the new script will do a good job on your system. If there are any problems
you may drop a line in the list.

If you want to insert your own mouseclicks in the script you can use the added "getmousepos.ahk"
to get the click positions. Start it and it will you show the mouse positions in the current window
as a tooltip. Stop it by closing the ahk-window in the systray.

73 de Matthias








  
  
  