Radar - version 1.72 

Little program for easy and quick view of
radar pictures from the Czech Hydrometeorological Institute website. 

First of all it creates a subdirectory DATA which stores all the data. 
Then download the page http://www.chmu.cz/meteo/rad/rad_data.php. 
If the download is not successfull then display an error message in the status bar 
or uses the last successfull downloaded page from the disk according to settings in INI file. 
Then from this page finds all references to the pictures in the last few hours 
according to the settings in the INI file. It expects data in 30 minutes intervals
so when setting up to 3 hours it downloads last 6 pictures. 
After that starts downloading of these pictures, but only if they have not been downloaded yet. 
Finally starts animation these pictures with the time intervals according to the settings in the INI file 
and in the status bar is always shown the current number of that image. 
Animation can be stopped by pressing Pause. 
In Pause mode can be pressed Left/Right keys to move the slide back/forward. 
Pressin F5 can refresh the data, re-download and load of the current data is done. 

Size of window (with picture) can be changed by pressing Up/Down keys or through the menu 
that appears after clicking on the status bar with the text "Size = 1.0x" 
Maximum size is determined by resolution of the Windows desktop, 
so some values in menu can be disabled. 

You can show red cross over picture indicating the position of specific cities. 
The definition of the position of the crosses must be stored in INI file (see below). 
Views/switching of crosses can be done through shortcuts F3/F4 (see below) 
or by using the menu that appears after clicking on the status bar 
with the text indicating the current cross. 

Time values inside pictures are shown the world time UTC, 
to obtain local time should be added 
+1 Hour during the winter time or +2 hrs at the time of daylight saving time. 
This information is shown in the bottom right corner in the status bar. 

The INI file can be set as follows: 
Size = 2.0 - the default window size at the start, the value must correspond to the menu 
PocetHodin = 3 - download pictures for defined number of hours back 
IntervalSnimku = 300 - the number of milliseconds to view each slide 
IntervalPosl = 3000 - the number of milliseconds to view the last slide
TimeoutStahovani = 10000 - the maximum number of milliseconds time to download files 
ProvadetPing = 0 - whether to verify the availability of web pages HMU using PING 
MazatStaraData = 1 - deleting the old data at the start (only after successfully loaded actual data) 
ZobrazitPredchoziPriChybe = 0 - show previous data (after an unsuccessful load actual data) 
    --> If it is turned off then in case of error while downloading data does not show previous successfully downloaded data 
MapyUrl = www.mapy.cz - Web site address to obtain a map with GPS coordinates for the user Cross 
ZobrazitVcetneOkresu = 0 - whether show cross in the status bar and menu, including crosses district in brackets
ZobrazitKriz = 1 - whether show Cross 1/0 
AktualniKriz = 1 - actual number of Cross, which is implicitly showed
KrizXX = Prague,148,172 - the name and position (pixels) of Cross with a number XX 

for example, 
Kriz01 = Prague,148.172 
Kriz02 = Brno,226.216 

In the file radar_krize.txt are stored positions of crosses 
for all municipalities and cities with more than 2500 inhabitants in the following format: Name of position,X,Y 
Thus, for example: Kuim (okr. Brno-Province),223.210 
By Shift+F4 can be defined position of crosses also with possibility of entering user defined positions. 
In this window are shown all defined positions of crosses from the file radar_krize.txt, 
and you can choose which of them will be stored in the INI file radar.ini and will be displayed 
in the programm (in the menu for the selection of crosses). 
It is also possible to enter user defined positions, which are saved in radar_krize.txt (at the end). 
Position of user defined Cross can be entered as a GPS in the form of: 4917'55.179'N, 16 31'49.413"E. 
GPS position in this format for a particular position can be determined by the key Maps, 
which opens the web page www.mapy.cz. In the INI file can be this default address of maps changed.

Shortcuts: 
F1       - About 
F3       - Switching to the next defined Cross (according to INI file) 
Shift+F3 - Switching to the previous defined Cross (according to INI file) 
F4       - Show/hide Cross (defined in the INI file) 
Shift+F4 - The definition of crosses with the possibility of entering user defined positions 
F5       - Redownload data 
Pause    - Stop/Start animation
Left     - In the Pause mode move the slide back 
Right    - In the Pause mode move the slide forward
Up       - increasing the size of the window 
Down     - reducing the size of the window 
Esc      - Exit (during the download interrupt download) 

The program is FREEWARE - can be freely copied. 
The program contains also the source code AutoIt v3. 

HISTORY: 
--------- 
Version 1.72 (3.7.2008) 
  - Esc during the download interrupts download 
  - Cursor HourGlass during download
  - When displayed window, "Definition of crosses" now disabled main window 
  - Several small internal optimizations

Version 1.71 (30.6.2008) 
  - Show empty maps as background (at the beginning and instead of a nonexistent picture) 
  - Show cross always (not until after the successful download of data) 
  - After change in the definitions crosses under certain conditions mark of right cross in the menu wasn't preserved
  - Bigger width of the box for position of cross in the status bar (when larger sizes of the window) 
  - Show current Cross position now also in the form of ToolTip help in the status bar 
  - Window with definition of crosses now centered when invoked multiple times
  - Cursor HourGlass during the doing of button "Write selected to the INI" 

Version 1.7 (20.6.2008) 
  - A new shortcut key: Shift+F4 --> definition of crosses with the possibility of entering user defined positions 
  - File radar_krize.txt contains list of cross definitions for the 564 municipalities (the village of 2500 inhabitants) 

Version 1.61 (16.6.2008) 
  - After hiding/showing Cross {F4} didn't refreshed mark of the current cross in menu of crosses 
  - When unavailable HTML pages of CHMU even if ZobrazitPredchoziPriChybe=0 
    last successfully downloaded data showed up when it was set ProvadetPing=0 

Version 1.6 (12.6.2008) 
  - When you run multiple instance activate previous instance 
  - F5 redownload of data now can be done also in Pause mode
  - A new option in the INI file: ZobrazitPredchoziPriChybe - show previous data in case of error 
    --> If it is turned off then in case of error while downloading data does not show previous successfully downloaded data 
  - Cross show up after the successful download of data 
  - Show ToolTip help in the status bar 
  - A new shortcut key: Shift+F3 --> switch to the previous defined Cross 
  - selecting of Cross now also by the menu in the status bar (and not just through F3) 
  - in INI file added the definition of crosses for more cities (regional cities) 

Version 1.53 (23.3.2008) 
  - A new option in the INI file: ProvadetPing - whether to verify the availability of web pages HMU 
  - At the start implicitly maximise the size of the window unless specified in the INI - Correction 
  - Compiled by a newer version AutoIt (3.2.10) 

Version 1.52 (9.11.2007) 
  - Drawing of Cross handled better (will remain displayed after overlap by another application) 

Version 1.51 (20.10.2007) 
  - A new command, "About" in the system menu 
  - At the start implicitly maximise the size of the window (unless otherwise specified in the INI) 
  - Code to prevent multiple execution better handled

Version 1.5 (11.9.2007) 
  - Several small internal optimisations
  - Eliminated flickering pictures redraw
  - Compiled by a newer version AutoIt (3.2.8) - faster 
  
Version 1.4 (24.9.2005) 
  - A new option in the INI file: Velikost - the default window size at the start 
  - New shortcuts Up/Down: increase/decrease the size of the window 

Version 1.31 (20.8.2005) 
  - by PING check whether there is a HMU web site available
  - When drawing crosses all the resources wasn't released (missing DeleteObject) 
  - A slight optimization of the drawing Cross (unnecessary multiplication 1*) 

Version 1.3 (17.8.2005) 
  - A new option in the INI file: MazatStaraData - deleting the old data at the start 
  - A new shortcut key F4: show/hide Cross (defined in the INI file) 
  - A new shortcut key F3: switching positions of defined Crosses (according to INI file) 
  - After the re-download of data (F5) sometime left showing "Downloading of data 6/6" 

Version 1.2 (31.7.2005) 
  - A new shortcut key F5: Re-download the data (not in the Pause) 
  - New shortcuts Left/Right: in Pause mode move the slide back/forward 
  - All the shortcuts enable when animation of pictures starts (not during the preparation) 
  - fixed Zero-length size of HTML file 
  - fixed crash after change size of window when number of pictures is zero

Version 1.1 (30.7.2005) 
  - A new shortcut key F1: About 
  - Prevent multiple execution 
  - finished correct displaying of current local time shift against UTC 
  - Pause shortcut key now doesn't block Pause functionality in other applications 
  - fixed bad location of the status bar when XP theme is turned on (different height of the title) 
  - fixed placement of elements now take into account the width of the window frame (3px) 
  - After the download timeout elapsed stop download: InetGet("abort") 
  - After any error in StringRegExp not exit application 

Version 1.0 (25.7.2005) 
  - The first version 

***** 

Peter Zednk 

petr.zednik@volny.cz 
http://www.volny.cz/petr.zednik/