WeatherDesk 0.54
by Fizzie
Weather Format Options and
Variables
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 |
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
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
The following tables list the various commands you can use in your step.rc to affect how WeatherDesk looks and behaves.
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:
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. Deafult = 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 |
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°” |
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.
Deafult = 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.
Deafult = 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” |
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. |
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.
The following is
an example of step.rc before and after the multiple city feature was utilized.
WeatherDeskPage
“/US/WA/Seattle.html”
WeatherDeskFormat
“Temp: #t#g, Wind #w”
[…other
irrelevant WeatherDesk commands…]
displays:
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:
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°”.