Saturday, 9 January 2016

Things I have learned about SpectrumLab

Adding Band, Date/Time to a filename automatically:

I have been using SpectrumLab for my Grabber Software for some years, and I'm still learning new things about it, as I strive to improve what I show on my website.

File naming and saving:

There are a number of ways of saving files automatically in SpectrumLab.  The first is available in the **Options**Screen Capture** tab.

Here you can add in the "Filename" text box, the Drive, route, and filename, for instance "D:\Spectrum\30M\Kapture\Argo.jpg"  This tells SpecLab where to save the file to, and the filename.  SpecLab will then append a "File index", to the filename, so they are not overwritten each time a new file is saved with the same filename.  The File index can be edited by simply over typing the number on the text box.  This all occurs when a **Periodic Action** takes place, which can be programmed to occur at given intervals (10 mins, or 4 hours, say).  See **Options**Periodic Actions** Tab.

I use the extremely simple FTP upload program by ON7YD, ArgoUpload.  Everytime a new file ends up in the directory, this Routine, at the time it uploads the file, strips the filename back to the first 4 characters in the filename.   A File named "Argo1234" will end up being FTP'd to the website as just "Argo" which is exactly what we want!  This action overwrites the older file with the same name already on the website, effectively updating it. 

The above method is fine if you only want a simple file name, because you cannot stop the addition of the file index process.  

I wanted to put in the filename, Band, Date, and Time, for future reference and ease of searching a particular file at a later time.  The appended index number was too simple.  However I was able to come up with another method of doing this, while retaining the name stripping feature of ArgoUpload to handle the overwriting of the file on the website.  This is how I did it.

A feature in SpecLab's Options, will allow the program to carry out specific actions at regular intervals (like every 10 minutes, or 4 hours, say).  See the **Options**Periodic Actions** Tab.  To activate the periodic action you must first tick the "Active" check box. 

Here above I have setup a Periodic Action which will happen 24 hours per day at regular intervals of 10:00 minutes.  Note the a periodic Action is activated by ticking (clicking) the Active box.

I have also added in the Action macro(s) text box a Periodic Action to Capture a Screen Shot, every 10 minutes, saving it to D:\Spectrum\40M\Kapture\..

By using this method of Capture, as a screenshot Periodic Action, you can pre-name the file using the internal programming facilities of SpecLab itself.  At every interval you can command SpecLab to capture a file, by entering what you want to happen in the Action (Macros) Text Box.

I have entered the command Capture and in brackets after the command the Filename, location to save the file, the filename, and the file type (either .jpg or .bmp).

I'll explain the procedure here:
There are 3 commands in the instruction, marked in orange Text:

Capture("D:\Spectrum\40M\Kapture\Argo 40M" +str("DDMMYY hhmm",now)+"z.jpg")

Capture - tells Speclab to initiate a screen capture.

" " - Quotes deliminate text in the filename.

+  - command - "Append"

str - command that says:  the String that follows should be converted by the command now to Date/Time format.

The instruction ends up like this:

D:\Spectrum\40M\Kapture\Argo 40M 100116 2340z.jpg

The file ends up in - D:\Spectrum\40M\Kapture\

With a filename - Argo 40M 100116 2340z.jpg

At upload time ArgoUpload strips the filename back to Argo.jpg and everything happens as before!

Don't forget to do a save to your "Config" file, before you exit SpecLab!  Otherwise you will have to do this all over again....

10 Jan 2016

No comments:

Post a Comment