Table of Contents

Using Variables within Actions

If you want to pass the actual variables read from the weather station, you may use the following strings when specifying actions.

Note: All variables are case sensitive.

Example: For instance, to send the current outdoor temperature and humidity to the program ABC.EXE, you would send:

  ABC.EXE "%OutdoorTempDegF% %OutdoorHumidity%"

Here is a list of variables:

1)  %StormAlertActive%                - Storm Alert Active (0 or 1), *Applies to La Crosse users only*

2)  %PressureRisingAlertActive%     - Pressure Rising Alert (0 or 1), *Applies to La Crosse users only*

3)  %PressureFallingAlertActive%    - Pressure Falling Alert (0 or 1), *Applies to La Crosse users only*

4)  %OutdoorTempDegF%               - Outside Temperature in degrees Fahrenheit

5)  %OutdoorTempDegC%               - Outside Temperature in degrees Celcius

6)  %IndoorTempDegF%                - Indoor Temperature in degrees Fahrenheit

7)  %IndoorTempDegC%                - Indoor Temperature in degrees Celcius

8)  %OutdoorHumidity%               - Outdoor Humidity (%)

9)  %IndoorHumidity%                - Indoor Humidity (%)

10) %OutdoorDewpointF%              - Outside Dewpoint Temperature in degrees Fahrenheit

11) %OutdoorDewpointC%              - Outside Dewpoint Temperature in degrees Celcius

12) %OutdoorWindchillF%             - Outdoor Wind Chill Temperature in degrees Fahrenheit

13) %OutdoorWindchillC%             - Outdoor Wind Chill Temperature in degrees Celcius

14) %OutdoorWindSpeedMPH%           - Outdoor Wind Speed in Miles Per Hour (current reading)

15) %OutdoorWindSpeedKMH%           - Outdoor Wind Speed in Kilometers Per Hour (current reading)

16) %OutdoorWindAverageDirection%   - Outdoor Average Wind Direction (in Degress 0 - 360)

17) %OutdoorWindAverageSpeedMPH%    - Outdoor Average Wind Speed in Miles Per Hour

18) %OutdoorWindAverageSpeedKMH%    - Outdoor Average Wind Speed in Kilometers Per Hour

19) %OutdoorWindGustSpeedMPH%       - Outdoor Wind Gust in Miles Per Hour

20) %OutdoorWindGustSpeedKMH%       - Outdoor Wind Gust in Kilometers Per Hour

21) %OutdoorWindDirection%          - Outdoor Wind Direction (current reading, 0-360)

22) %OutdoorRainTotalIN%            - Outdoor Rain Inches Total in inches.

23) %OutdoorRain24HrIN%             - Outdoor Rain Inches 24 hours in inches

24) %OutdoorRain1HrIN%              - Outdoor Rain Inches 1 hour in inches

25) %OutdoorRainTotalMM%            - Outdoor Rain Inches Total in mm.

26) %OutdoorRain24HrMM%             - Outdoor Rain Inches 24 hours in mm.

27) %OutdoorRain1HrMM%              - Outdoor Rain Inches 1 hour in mm.

28) %OutdoorPressureAbsoluteINHG%   - Outdoor Absolute Air Pressure in Hg.

29) %OutdoorPressureRelativeINHG%   - Outdoor Relative Air Pressure in Hg.

30) %OutdoorPressureAbsoluteHPA%    - Outdoor Absolute Air Pressure in HPA.

31) %OutdoorPressureRelativeHPA%    - Outdoor Relative Air Pressure in HPA.

32) %Time%                          - Curent timestamp.

Note: If you are sending parameters to a batch file, batch files can only manipulate 9 command line parameters at a time (%1 - %9), if you want to access more than 9 parameters in a batch file, you will need to use the batch file command SHIFT.

Here is a really long example of how to retrieve 31 command line parameters in a batch file.

example.bat
@ECHO OFF
 
SET p1=%1
 
SET p2=%2
 
SET p3=%3
 
SET p4=%4
 
SET p5=%5
 
SET p6=%6
 
SET p7=%7
 
SET p8=%8
 
SET p9=%9
 
SHIFT 
 
SHIFT 
 
SHIFT
 
SHIFT 
 
SHIFT 
 
SHIFT 
 
SHIFT 
 
SHIFT 
 
SHIFT
 
SET p10=%1
 
SET p11=%2
 
SET p12=%3
 
SET p13=%4
 
SET P14=%5
 
SET p15=%6
 
SET p16=%7
 
SET p17=%8
 
SET p18=%9
 
SHIFT 
 
SHIFT 
 
SHIFT 
 
SHIFT 
 
SHIFT 
 
SHIFT 
 
SHIFT 
 
SHIFT 
 
SHIFT
 
SET p19=%1
 
SET p20=%2
 
SET p21=%3
 
SET p22=%4
 
SET P23=%5
 
SET p24=%6
 
SET p25=%7
 
SET p26=%8
 
SET p27=%9
 
SHIFT
 
SHIFT 
 
SHIFT 
 
SHIFT 
 
SHIFT 
 
SHIFT 
 
SHIFT 
 
SHIFT 
 
SHIFT
 
SET p28=%1
 
SET p29=%2
 
SET p30=%3
 
SET p31=%4
 
echo %p1% %p2% %p3% %p4% %p5% %p6% %p7% %p8% %p9% %p10% %p11% %p12% %p13% %p14% %p15% %p16% %p17% %p18% %p19% %p20% %p21% %p22% %p23% %p24% %p25% %p26% %p27% %p28% %p29% %p30% %p31%
 
 
 
Back to top
using_variables_within_actions.txt · Last modified: 01/05/2010 14:29 by john@lissproductions.com