WeatherDesk 0.56

 

by Fizzie

 

 

 

 

Table of Contents

 

Introduction

History

Installation

Configuration Options

      Display Options

      Weather Format Options and Variables

      Weather Condition Bitmaps

      Popup Forecast Window Options

Bang Commands

Multiple City Support

Popup Forecast Window

Sample STEP.RC

 

 

Introduction

 

WeatherDesk is a LiteStep loadmodule which retrieves various kinds of weather information from the Internet, and displays it on the LiteStep desktop.  It is highly configurable, supports transparency and conditions bitmaps, and supports multiple-city weather information displays.

 

Below are a couple of partial screenshots showing WeatherDesk in different modes.

 


            


WeatherDesk with a background bitmap and

scrolling weather conditions

 

WeatherDesk transparent on desktop with

cycling weather conditions

 

 

 

History

 

     v0.50 - first public release

    

     v0.51

     added windchill and heat index variables

     added ability to launch weather page from right-click menu

     fixed bug causing Tampa's weather conditions to always be displayed on some computers

     fixed bug causing a greater than symbol (>) to be displayed in front of the value for humidity                                             

    

     v0.52

     improved behavior when not connected to internet

     uses separate thread for updating weather, so that the process doesn't affect Litestep's responsiveness

     implemented a feature allowing several lines of weather info to be cycled (see WeatherDeskCycleDelay for more info)

     added conditions variable for use in WeatherDeskFormat (clear, mostly cloudy, etc)

     added WeatherDeskUpdateString, so a custom update string can be used (defaults to "Retrieving weather conditions...")

     added 3 new bang commands:  !ShowLSDW, !HideLSDW, and !ToggleLSDW

    

     v0.53

     fixed bug causing long weather conditions (e.g., "Light Rain Showers") to be truncated

     changed module name to "WeatherDesk" (thanks to Glenn Krutsinger for the idea)

     changed all step.rc commands from "DesktopWeather..." to "WeatherDesk..."

     changed bang command names to !ShowWD, HideWD, and !ToggleWD

     implemented support for people behind proxies...if you're behind a proxy and still have problems, please let me know

     added feature to overlay weather condition-specific graphic on top of WeatherDesk

     included 18 bitmaps to work with the condition-specific graphic feature

     added feature to optionally scroll text while cycling (see WeatherDeskScrollDuringCycle for more info)

     added new bang command:  !MoveWD x,y

     WeatherDeskX and WeatherDeskY now accept negative parameters

     added WeatherDeskStartHidden command

     added metric unit support (see WeatherDeskFormat variables)

 

     v0.54

     added multiple city support

     created HTML helpfile

     added WeatherDeskAlwaysOnTop command

 

     v0.55

     implemented skinnable popup forecast window containing weather stats and 6-day forecast

     fixed bug causing fog bitmap not to display sometimes

     fixed transparency problem with background bitmaps

 

     v0.56

     added WeatherDeskPopupX and WeatherDeskPopupY step.rc variables to control the initial position of the popup

     added WeatherDeskPopupAlwaysOnTop and WeatherDeskPopupAlwaysOnBottom step.rc commands

     fixed bug causing a window class registration error on recycle

 

 

Installation

 

To install WeatherDesk, just add the following line to your step.rc, making adjustments for the path that WeatherDesk.dll is stored in, if necessary:

 

LoadModule WeatherDesk.dll

 

 

 

Configuration Options

 

The following tables list the various commands you can use in your step.rc to affect how WeatherDesk looks and behaves.

 

Display Options

Command

Description

Samples

WeatherDeskX [-]integer

Specifies, in screen coordinates, the left edge of the WeatherDesk window.

WeatherDeskX 100  //places the WeatherDesk window 100 pixels from the left edge of the screen

WeatherDeskX –100  //places the WeatherDesk window 100 pixels from the right edge of the screen

WeatherDeskY [-]integer

Specifies, in screen coordinates, the top edge of the WeatherDesk window.

WeatherDeskY 100  //places the WeatherDesk window 100 pixels from the top edge of the screen

WeatherDeskY –100  //places the WeatherDesk window 100 pixels from the bottom edge of the screen

WeatherDeskWidth integer

Specifies, in pixels, the width of the WeatherDesk window.

WeatherDeskWidth 300  //the WeatherDesk window is created with a width of 300 pixels

WeatherDeskHeight integer

Specifies, in pixels, the height of the WeatherDesk window.

WeatherDeskHeight 100  //the WeatherDesk window is created with a height of 100 pixels

WeatherDeskImage filename.bmp

Specifies the filename of a bitmap to be used as WeatherDesk’s background.  If ommitted, WeatherDesk will draw weather conditions transparently on the desktop.

WeatherDeskImage weatherback.bmp  //uses the file weatherback.bmp as the background for WeatherDesk

WeatherDeskImage “c:\images\weather.bmp”  //uses the file c:\images\weather.bmp as the background image

WeatherDeskImage .none  //draws weather conditions transparently on the desktop without a background image

WeatherDeskFont fontname

Specifies the font to be used to draw weather conditions.

WeatherDeskFont Arial  //uses the font Arial to draw weather conditions

WeatherDeskFont “Times New Roman”  //uses the font Times New Roman to draw weather conditions

WeatherDeskFontSize integer

Specifies the size of the font to be used to draw weather conditions

WeatherDeskFontSize 18  //specifies an 18-point font will be used to draw weather conditions

WeatherDeskFontColor color

Specifies the color of the font to be used to draw weather conditions

WeatherDeskFontColor 0000FF //specifies that a blue font will be used to draw weather conditions

WeatherDeskUpdateColor color

Specifies the color of the font to be used to draw the weather update text while WeatherDesk is retrieving updated weather conditions from the Internet.

WeatherDeskUpdateColor FF0000 //specifies that a red font will be used to draw the weather update text while WeatherDesk is retrieving updated weather conditions

WeatherDeskUpdateString string

Specifies the text to display while WeatherDesk is retrieving udpated weather conditions from the Internet.  If not specified, defaults to “Retrieving weather conditions…”

WeatherDeskUpdateString “Connecting…” //specifies that the string Connecting… will be shown on the WeatherDesk window when WeatherDesk updates its weather conditions from the Internet

WeatherDeskStartHidden

If this command is present in your step.rc, WeatherDesk will start in a hidden state when it is loaded.

 

WeatherDeskAlwaysOnTop

If this is present in your step.rc, the WeatherDesk window will always be on the top of the Z-order.

 

WeatherDeskCycleDelay integer

If this command is present, WeatherDesk will cycle multiple lines of text sequentially, with a delay of integer seconds.  If not present, WeatherDesk will attempt to display all lines simultaneously.  This setting has no effect it multiple lines are not used.

WeatherDeskCycleDelay 5  //WeatherDesk will cycle multiple lines of text with a 5-second delay

WeatherDeskScrollDuringCycle

If present, this will cause WeatherDesk to scroll lines of text vertically as they cycle.  Has no effect if cycling is not used.

 

WeatherDeskUpdate integer

Specifies, in minutes, how often WeatherDesk should update its weather conditions from the Internet

WeatherDeskUpdate 15  //WeatherDesk will update its weather conditions every 15 minutes

WeatherDeskPage /path/to/htmlfile

Specifies the location of the htmlfile on www.wunderground.com that WeatherDesk will use to retrieve weather conditions.  See below for more information.

WeatherDeskPage “/US/CA/Walnut_Creek.html”  //WeatherDesk will retrieve conditions for Walnut Creek, CA

WeatherDeskPage “/global/stations/94326.html”  //WeatherDesk will retrieve conditions for Alice Springs, Australia

 

How to determine the htmlfile to use in the WeatherDeskPage command:

 

  1. Go to www.wunderground.com.
  2. In the text box with the label “Find the Weather for any City, State or Zipcode, or Country”, enter your location and click the “Fast Forecast” button.
  3. Navigate until you reach your city’s forecast.
  4. When your forecast is displayed, look at the URL your browser is currently displaying.
  5. Copy this entire URL (minus the leading http://www.wunderground.com part), and paste it as the parameter to WeatherDeskPage.

 

 

 

Weather Format Options

Command

Description

Samples

WeatherDeskFormat string

Specifies the format that WeatherDesk will use to display weather conditions.  See following table for more info.

 

WeatherDeskXOffset integer

Specifies, in pixels, the horizontal offset from WeatherDesk’s left edge that will be used to display weather conditions.  Default = 0.

WeatherDeskXOffset 5  //WeatherDesk will display weather conditions beginning 5 pixels from the left edge of the WeatherDesk window

WeatherDeskYOffset integer

Specifies, in pixels, the vertical offset from WeatherDesk’s top edge that will be used to display weather conditions.  Default = 0.

WeatherDeskYOffset 3  //WeatherDesk will display weather conditions beginning 3 pixels from the top edge of the WeatherDesk window

 

Weather Format Variables

Variable

Description

Example

Possibe Result

#g

Degree symbol

 

 

#t

Temperature in Farhenheit

WeatherDeskFormat “Current temp is #t”

Current temp is 52

#T

Temperature in Celsius

WeatherDeskFormat “Current temp is #T#gC”

Current temp is 15°C

#d

Dewpoint in Fahrenheit

WeatherDeskFormat “Temp: #t, Dewpoint: #d”

Temp: 52, Dewpoint 47

#D

Dewpoint in Celsius

WeatherDeskFormat “Dewpoint:  #D#g”

Dewpoint:  13°

#I

Heat Index in Fahrenheit.  Displayed as “n/a” if heat index is not applicable to current conditions.

WeatherDeskFormat “Temp: #t, Heat Index #I”

Temp: 89, Heat Index 95

or

Temp: 42, Heat Index n/a

#I

Heat Index in Celsius.  Displayed as “n/a” if heat index is not applicable to current conditions.

WeatherDeskFormat “Temp #T, Heat Index #I”

Temp: 30, Heat Index 34

or

Temp: 11, Heat Index n/a

#c

Windchill in Fahrenheit.  Displayed as “n/a” if windchill is not applicable to current conditions.

WeatherDeskFormat “Windchill:  #c#gF”

Windchill:  -30°F

or

Windchill:  n/a°F

#C

Windchill in Celsius.  Displayed as “n/a” if windchill is not applicable to current conditions.

WeatherDeskFormat “Windchill:  #C#gC”

Windchill:  -32°C

or

Windchill:  n/a°C

#w

Winds with speeds in mph.

WeatherDeskFormat “Wind:  #w”

Wind:  Calm

or

Wind:  Variable at 6

or

Wind:  NNW at 35

#W

Winds with speeds in kph.

WeatherDeskFormat “Wind:  #W”

Wind:  Calm

or

Wind:  Variable at 8

or

Wind:  NNW at 47

#p

Pressure in inches mercury

WeatherDeskFormat “Pressure:  #p”

Pressure:  29.12

#P

Pressure in millibars

WeatherDeskFormat “Pressure:  #P”

Pressure:  1012

#h

Humidity

WeatherDeskFormat “Humidity:  #h”

Humidity:  52%

#s

Conditions

WeatherDeskFormat “#s”

Clear

or

Scattered Clouds

or

Heavy Blowing Snow

##

Pound sign

 

 

#n

Carraige Return (if WeatherDeskCycleDelay is not defined)

or

Multiline line delimiter (if WeatherDeskCycleDelay is defined)

WeatherDeskFormat “Temp:  #t#g#F#nWind:  #w”

Temp:  52°F

Wind:  SE at 15

 

NOTE:  If WeatherDeskCycleDelay is not defined, these lines of text will be displayed simultaneously, as shown above.  If WeatherDeskCycleDelay is defined, the lines will be cycled sequentially.

#b(0|1|2|3|4)

Used with multiple city support, this tells WeatherDesk which city’s condition bitmap to display during a given line of text.

WeatherDeskPage0 “/US/CA/Los_Angeles.html”

WeatherDeskPage1 “/US/WA/Seattle.html”

WeatherDeskFormat “#b0LAX: #t0#g#n#b1SEA: #tt1#g”

This would display Los Angeles’ weather condition bitmap while displaying the text “LAX:  88°”, and would display Seattle’s weather condition bitmap while displaying the text “SEA:  66°”

 

 

 

 

Weather Condition Bitmaps

WeatherDesk allows you to display condition-specific bitmaps on top of its main display.  These can be used in either of WeatherDesk’s display modes:  transparently on the desktop, or with a background bitmap.

Command

Description

Samples

WeatherDeskPicXOffset integer

Specifies, in pixels, the horizontal offset from WeatherDesk’s left edge that will be used to display the weather condition bitmap.  Default = 0.

WeatherDeskPicXOffset 5  //WeatherDesk will display the weather condition bitmap beginning 5 pixels from the left edge of the WeatherDesk window

WeatherDeskPicYOffset integer

Specifies, in pixels, the vertical offset from WeatherDesk’s top edge that will be used to display the weather condition bitmap.  Default = 0.

WeatherDeskPicYOffset 3  //WeatherDesk will display the weather condition bitmap beginning 3 pixels from the top edge of the WeatherDesk window

WeatherDeskClearPic filename.bmp

This bitmap is displayed when the weather condition is “Clear”.

WeatherDeskClearPic “c:/images/wx-clear.bmp”

WeatherDeskHazePic filename.bmp

This bitmap is displayed when the weather condition is “Haze” or “Smoke”.

WeatherDeskHazePic “wx-haze.bmp”

WeatherDeskPCloudyPic filename.bmp

This bitmap is displayed when the conditions are “Partly Cloudy” or “Scattered Clouds”.

WeatherDeskPCloudyPic “wx-pcloudy.bmp”

WeatherDeskMCloudyPic filename.bmp

This bitmap is displayed when the conditions are “Mostly Cloudy”.

WeatherDeskMCloudyPic “wx-mcloudy.bmp”

WeatherDeskOvercastPic filename.bmp

This bitmap is displayed when the conditions are “Overcast”.

WeatherDeskOvercastPic “wx-overcast.bmp”

WeatherDeskDustPic filename.bmp

This bitmap is displayed for all “Dust” and “Sand” conditions.

WeatherDeskDustPic “wx-dust.bmp”

WeatherDeskFogPic filename.bmp

This bitmap is displayed for all “Fog” conditions, except “Freezing Fog”

WeatherDeskFogPic “wx-fog.bmp”

WeatherDeskLtRainPic filename.bmp

This bitmap is displayed for all “Light Rain” conditions.

WeatherDeskLtRainPic “wx-ltrain.bmp”

WeatherDeskRainPic filename.bmp

This bitmap is displayed for all “Rain” conditions.

WeatherDeskRainPic “wx-rain.bmp”

WeatherDeskHvyRainPic filename.bmp

This bitmap is displayed for all “Heavy Rain” conditions.

WeatherDeskHvyRainPic “wx-hvyrain.bmp”

WeatherDeskLtSnowPic filename.bmp

This bitmap is displayed for all “Light Snow” conditions.

WeatherDeskLtSnowPic “wx-ltsnow.bmp”

WeatherDeskSnowPic filename.bmp

This bitmap is displayed for all “Snow” conditions.

WeatherDeskSnowPic “wx-snow.bmp”

WeatherDeskHvySnowPic filename.bmp

This bitmap is displayed for all “Heavy Snow” conditions.

WeatherDeskHvySnowPic “wx-hvysnow.bmp”

WeatherDeskBlizzardPic filename.bmp

This bitmap is displayed for “Blizzard” and “Heavy Blowing Snow” and “Heavy Drifting Snow” conditions.

WeatherDeskBlizzardPic “wx-blizzard.bmp”

WeatherDeskDrizzlePic filename.bmp

This bitmap is displayed for all “Drizzle” and “Mist” conditions.

WeatherDeskDrizzlePic “wx-drizzle.bmp”

WeatherDeskIcePic filename.bmp

This bitmap is displayed for all “Freezing” weather conditions.

WeatherDeskIcePic “wx-ice.bmp”

WeatherDeskTStormPic filename.bmp

This bitmap is displayed for all “Thunder…” conditions.

WeatherDeskTStormPic “wx-tstorm.bmp”

WeatherDeskUnknownPic filename.bmp

This bitmap is displayed when a weather condition match is not found.

WeatherDeskUnknownPic “wx-unknown.bmp”

 

 

Popup Forecast Window Options

Command

Description

Samples

WeatherDeskPopupThemeFile path

Specifies the theme .ini file which WeatherDesk should use to display the popup forecast window.

WeatherDeskPopupThemeFile c:\litestep\weatherdesk\skins\globe\globe.ini

WeatherDeskShowPopupDegrees

Specifies that all temperatures should be displayed with the degree symbol.

WeatherDeskShowPopupDegrees

WeatherDeskShowPopupTempsInCelsius

Specifies that all temperatures should be displayed in Celsius, instead of Fahrenheit.

WeatherDeskShowPopupTempsInCelsius

WeatherDeskShowPopupPressureInMb

Specifies that all pressures should be displayed in millibars, instead of inches mercury.

WeatherDeskShowPopupPressureInMb

WeatherDeskShowPopupWindInKph

Specifies that all windows should be displayed in kilometers per hour, instead of miles per hour.

WeatherDeskShowPopupWindInKph

WeatherDeskShowPopupInMetric

Specifies that all measurements in the popup forecast window should be displayed in metric, instead of English units.

WeatherDeskShowPopupInMetric

WeatherDeskShowPopupUnits

Specifies that all measurements in the popup window will appear with their units.  If this is not present, all measurements will appear without unit designations.

WeatherDeskShowPopupUnits

WeatherDeskPopupX integer

Specifies, in pixels, the x-coordinate for the popup window’s initial position.

WeatherDeskPopupX 300

WeatherDeskPopupY integer

Specifies, in pixels, the y-coordinate for the popup window’s initial position.

WeatherDeskPopupY 500

WeatherDeskPopupAlwaysOnTop

If present, this will cause the popup window to always be on top when it is visible.

WeatherDeskPopupAlwaysOnTop

WeatherDeskPopupAlwaysOnBottom

If present, this will cause the popup window to always be below other running applications.

WeatherDeskPopupAlwaysOnBottom

 

 

 

Bang Commands

 

Command

Description

!HideWD

Hides the WeatherDesk window.

!ShowWD

Displays the WeatherDesk window.

!ToggleWD

Hides the WeatherDesk window if it is currently visible; otherwise, shows the WeatherDesk window.

!MoveWD x,y

Moves the WeatherDesk window to the coordinates specified by x,y.

!ToggleWDPopup [integer]

Shows or hides the WeatherDesk popup forecast window, as long as a theme is defined.  If WeatherDesk is being run in multiple-city mode, this bang command can be followed by an integer, which will tell WeatherDesk which city to display the forecast for.

 

 

 

Multiple City Support

 

WeatherDesk supports displaying weather conditions (and weather condition bitmaps) for multiple cities.  To use this feature, do the following:

 

1.       In your step.rc, rename the WeatherDeskPage command to WeatherDeskPage0.

  1. Add additional commands (up to 4) for additional cities.  These are WeatherDeskPage1, WeatherDeskPage2, and so forth.
  2. Edit your WeatherDeskFormat command, and add the city number after each weather variable in the string. 
  3. If you intend to use cycling, you can enter #b[0|1|2|3|4] variables into WeatherDeskFormat for specifying when to display each city’s condition bitmap.
  4. Recycle LiteStep.

 

The following is an example of step.rc before and after the multiple city feature was utilized.

 

Before

WeatherDeskPage “/US/WA/Seattle.html”

WeatherDeskFormat “Temp: #t#g, Wind #w”

[…other irrelevant WeatherDesk commands…]

 

displays: 

 


 

 


After

WeatherDeskPage0 "/US/CA/Los_Angeles.html"

WeatherDeskPage1 "/US/WA/Seattle.html"

WeatherDeskPage2 "/US/AR/Little_Rock.html"

WeatherDeskFormat "#b0LAX: #t0#g, wind #w0#n#b1SEA: #t1#g, wind #w1#n#b2LIT: #t2#g, wind #w2"

WeatherDeskCycleDelay 2

[…other irrelevant WeatherDesk commands…]

 

displays: 

 


 

 


Notes

You can also display information for multiple cities on the same line (without cycling) by using a WeatherDeskFormat string like

“LAX: #t0#g, SEA: #t1#g, LIT: #t2#g” (using data from the above example).  This would display something like

“LAX:  88°, SEA:  55°, LIT: 66°”.

 

Popup Forecast Window

 

Beginning with version 0.55, WeatherDesk has a skinnable popup window which can display a 6-day forecast and various weather stats.  There are two methods which can be used to display this window:

  1. Right-click on WeatherDesk, and select “Show Popup For”->”[City Name]”
  2. Execute the !ToggleWDPopup [integer] command, where the [integer] is an optional integer representing the city number, for people using multiple cities.

 

In order to enable support for the popup forecast window, you must do the following things:

  1. In your step.rc, add the line WeatherDeskPopupThemeFile path, where path is the location of a theme .INI file.  Two themes are supplied with WeatherDesk 0.55, or you can create your own.
  2. Optionally add other Popup Forecast Window commands to your step.rc, to modify how WeatherDesk displays weather stats in the window.

 

 

Sample STEP.RC

 

Because WeatherDesk supports so many options, I have received much e-mail from people asking what step.rc options to use.  Below is a basic configuration, which when added to your step.rc, will enable all of WeatherDesk’s basic features.  The only things you’ll have to change are the WeatherDeskX and WeatherDeskY co-ordinates, and the WeatherDeskPage variable to match your own location.  This configuration doesn’t use a background bitmap, but you can easily add one by supplying a WeatherDeskImage variable.  Make sure that the WeatherDeskPic variables and the WeatherDeskThemeFile variable are set to locations appropriate for your system.

 

WeatherDeskX 0

WeatherDeskY 0

WeatherDeskCycleDelay 3

WeatherDeskFontColor FFFFFF

WeatherDeskHeight 40

WeatherDeskWidth 350

WeatherDeskFormat "#b0LAX:  #t0#gF, Wind #w0 mph#n#b1TPA:  #t1#gF, Wind #w1 mph#n#b2SEA: #t2#gF, Wind #w2 mph"

WeatherDeskXOffset 54

WeatherDeskYOffset 12

WeatherDeskFont "Century Gothic"

WeatherDeskFontSize 18

WeatherDeskUpdate 10

WeatherDeskUpdateColor FF0000

WeatherDeskPage0 "/US/CA/Los_Angeles.html"

WeatherDeskPage1 "/US/FL/Tampa.html"

WeatherDeskpage2 "/US/WA/Seattle.html"

WeatherDeskPicXOffset 8

WeatherDeskPicYOffset 6

WeatherDeskClearPic wx-clear.bmp

WeatherDeskDustPic wx-dust.bmp

WeatherDeskFogPic wx-fog.bmp

WeatherDeskLtRainPic wx-ltrain.bmp

WeatherDeskRainPic wx-rain.bmp

WeatherDeskHvyRainPic wx-hvrain.bmp

WeatherDeskDrizzlePic wx-drizzle.bmp

WeatherDeskHazePic wx-haze.bmp

WeatherDeskPCloudyPic wx-pcloudy.bmp

WeatherDeskMCloudyPic wx-mcloudy.bmp

WeatherDeskOvercastPic wx-overcast.bmp

WeatherDeskLtSnowPic wx-ltsnow.bmp

WeatherDeskSnowPic wx-snow.bmp

WeatherDeskHvySnowPic wx-hvsnow.bmp

WeatherDeskBlizzardPic wx-blizzard.bmp

WeatherDeskUnknownPic wx-unknown.bmp

WeatherDeskIcePic wx-ice.bmp

WeatherDeskTStormPic wx-tstorm.bmp

WeatherDeskScrollDuringCycle

WeatherDeskPopupThemeFile c:\litestep\weatherdesk\skins\globe.ini

WeatherDeskShowPopupDegrees

WeatherDeskShowPopupPressureInMb

WeatherDeskShowPopupUnits