How to skin for different symbols? - Wind direction, rather than weather type
Started by mark76uk


Rate this topic
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5


43 posts in this topic
nickroberts1
Junior Member
**


0
2 posts 0 threads Joined: Feb 2003
02-23-2003, 07:18 PM -
#16
This screenshot is easier to see....
Q Section
Weapons Я Us
*****


0
899 posts 100 threads Joined: Feb 2003
02-25-2003, 08:54 PM -
#17
Wooohooo!
We got Day/Night icons to work properly in WM! Thanks to the sample code mark76uk supplied it works and we are now using close to 60 different icons. The code mark76uk wrote is:

[default icons]
IF (%_CurrentTime_Hour_24% > 19) OR (%_CurrentTime_Hour_24% < 6)
{
Sun = clearmoon.png
Clouds = cloudymoon.png
Lightning = stormynight.png
}
ELSE
{
Sun = sunnyday.png
Clouds = cloudyday.png
Lightning = stormyday.png
}

This is to go in the skin.ini file.
So there it is ladies and gentlemen. Well the next thing we are trying will be having a third WM to show Sunrise, Sunset, etc. Big Grin

HMSS Q Section
HMSS Q Section
click here for 30+ ideas from a Special Plugin List
some examples=
UV Index Monitor, Allergy Monitor, TLB Version Monitor, Cinema Monitor
Visualise World Righteousness
Semper Ad Fundum
Working for the Secret Intelligence Service
shapeshifter
Senior Member
****


0
658 posts 24 threads Joined: Sep 2002
02-26-2003, 05:37 AM -
#18
That's great! I had no idea the skin.ini supported any sort of programming language. This opens up all sorts of possibilities! What language is that? They syntax looks a little like C++ or JavaScript, but the variable format doesn't look familiar.
mark76uk
Member
***


0
111 posts 17 threads Joined: Feb 2003
02-26-2003, 09:55 AM -
#19
Are you sure it works night and day, QSection? You see, I
never thought that code would work with the present
version. I can only imagine that Weather Monitor is ignoring
half of those code lines and is showing you something
based on the others? Apologies if I have misled people.

The idea was to show how useful a few lines of simple code
could be *if* some kind of macro language was added to a
future version.

Yes, I agree, it would be an exciting prospect if code like
that worked. That was my purpose, to campaign for it by
showing people nice examples of how it could be used (I may
do some more soon.)

shapeshifter Wrote:What language is that? They syntax looks a little like C++ or JavaScript, but the variable format doesn't look familiar.

The code is generic. Allowing people to follow it easily was my main aim.

/Mark
Q Section
Weapons Я Us
*****


0
899 posts 100 threads Joined: Feb 2003
02-26-2003, 10:17 AM -
#20
Hi mark76uk

Well we *almost* had it. At the time we tried it (nighttime) WM was displaying daytime icons. We changed/added that code and voila - nightime icons. That is when we posted last. When checking the next day (daytime) lo and behold the icons were still in the nighttime mode. :0
So since we were just about to contact you perhaps you can render some assistance here with this day/night thing.

Thank you,

HMSS Q Section
HMSS Q Section
click here for 30+ ideas from a Special Plugin List
some examples=
UV Index Monitor, Allergy Monitor, TLB Version Monitor, Cinema Monitor
Visualise World Righteousness
Semper Ad Fundum
Working for the Secret Intelligence Service
mark76uk
Member
***


0
111 posts 17 threads Joined: Feb 2003
02-26-2003, 10:39 AM -
#21
I'll try to find a solution, based on the idea by Shapeshifter..
shapeshifter Wrote:You could have, for instance, a "Clear Night" icon, but the problem would be finding a web page that reports the conditions and Day/Night cylce relatively close together in the page (ideally: adjacent).
I'm not really expecting that this 'ideal page' will exist though. Otherwise, well..
Yuri Kobets Wrote:Yes, the next version of the WM will support day/night icons
Yuri seems to be a fast worker. I wouldn't be surprised if we get the new version within a month.

Really though, until a simple macro language is added, nearly every one of us (except the serious programmer types) will be heavily dependant on Yuri to solve these type of niggling problems.

/Mark
Yuri Kobets
Posting Freak
*****


10
6,208 posts 429 threads Joined: Jan 2002
02-26-2003, 10:43 AM -
#22
Quote:Well we *almost* had it. At the time we tried it (nighttime) WM was displaying daytime icons. We changed/added that code and voila - nightime icons. That is when we posted last. When checking the next day (daytime) lo and behold the icons were still in the nighttime mode.
All right the only format for .ini files is:
Code:
<name> = <value>
So TLB always find moon picture Wink

BTW it is possible to make day/night icons right now. If provider show different icons for day and night you can take (parse) the picture file name from webpage into Conditions value and show needed icon on weather monitor.
The TORDEX Team
http://www.tordex.com
Q Section
Weapons Я Us
*****


0
899 posts 100 threads Joined: Feb 2003
02-26-2003, 10:48 AM -
#23
mark76uk

FYI - We use this page:
http://www.aws.com/aws_2001/asp/obsForec...V&obs=full
See if you can tell if there is a useable code on viewing the source code.
HMSS Q Section
click here for 30+ ideas from a Special Plugin List
some examples=
UV Index Monitor, Allergy Monitor, TLB Version Monitor, Cinema Monitor
Visualise World Righteousness
Semper Ad Fundum
Working for the Secret Intelligence Service
Q Section
Weapons Я Us
*****


0
899 posts 100 threads Joined: Feb 2003
02-26-2003, 11:00 AM -
#24
Hello Yuri
We have all the icons needful - a complete day set and a complete night set. They are all together in the icon file. Their names for example are
partlycloudy.png
nt_partlycloudy.png
A reminder - we have all the icons now displaying properly except not at the proper time.
So right now - local time is daytime and the night Partly Cloudy icon is displayed. It is listed in the skin.ini file under
[instaweather]. We only have the default 8 icons listed under
[default icons].

We guess we will just wait patiently for WM 1.3 unless you have any further ideas for us. Smile

HMSS Q Section
HMSS Q Section
click here for 30+ ideas from a Special Plugin List
some examples=
UV Index Monitor, Allergy Monitor, TLB Version Monitor, Cinema Monitor
Visualise World Righteousness
Semper Ad Fundum
Working for the Secret Intelligence Service
mark76uk
Member
***


0
111 posts 17 threads Joined: Feb 2003
02-26-2003, 11:03 AM -
#25
I think I found the elusive 'ideal page' layout. It's only featured on wunderground.com pages, however - not your preferred aws service.

This screenshot is from near the bottom of a city weather report's left hand navigation bar. The important text is highlighted. I'll see if it works..
Q Section
Weapons Я Us
*****


0
899 posts 100 threads Joined: Feb 2003
02-26-2003, 11:24 AM -
#26
What is not understood is why and (how close) the conditions and the time need to be close together. On our favorite page the two items are very close are they not? Here is a part of the code from the page:
<td bgcolor="ccccff" colspan=2>This Afternoon</td>
</tr> <tr> <td bgcolor="#FFFFFF" valign="top"> <img src="icons/partlycloudy.GIF" alt="Partly Cloudy"></td>

The reason we do not prefer Weather Underground is that there are no weather stations anywhere near us. When we check the 4 closest weather underground stations against a weather station from AWS (2 km from us) the temperatures, pressure and humidity are all off appreciably due to being out of proximity.

HMSS Q Section
HMSS Q Section
click here for 30+ ideas from a Special Plugin List
some examples=
UV Index Monitor, Allergy Monitor, TLB Version Monitor, Cinema Monitor
Visualise World Righteousness
Semper Ad Fundum
Working for the Secret Intelligence Service
mark76uk
Member
***


0
111 posts 17 threads Joined: Feb 2003
02-26-2003, 11:33 AM -
#27
You may be right there Smile, but only assuming that the "this afternoon" heading disappears at the end of the afternoon. Maybe so? /Mark
Q Section
Weapons Я Us
*****


0
899 posts 100 threads Joined: Feb 2003
02-26-2003, 11:38 AM -
#28
It goes in this progression something like:

This Morning
Today
This Afternoon
Remainder of Day
This Evening
Tonight
Wednesday

HMSS Q Section
HMSS Q Section
click here for 30+ ideas from a Special Plugin List
some examples=
UV Index Monitor, Allergy Monitor, TLB Version Monitor, Cinema Monitor
Visualise World Righteousness
Semper Ad Fundum
Working for the Secret Intelligence Service
mark76uk
Member
***


0
111 posts 17 threads Joined: Feb 2003
02-26-2003, 12:07 PM -
#29
It was interesting to try, but I'm thinking that Weather Monitor cannot take multiple lines of HTML as conditions to look for. I am having no luck with my experiments.

Fact is that
Code:
Partly cloudy night
is a lot different from
Code:
Tonight</td>
                </tr>
                <tr>
                    <td bgcolor="#FFFFFF" valign="top"><img src="icons/nt_partlycloudy.GIF"
actual aws code, but doesn't show the true extent of the nasty carriage returns and code spacing

There is a tiny chance that this could work with the correct amount of luck or fiddling, but I'm thinking not. To me, having nice moon icons at night is not worth a lot of work.. particularly considering that the next version will be along in weeks or months.

Oh well.. save your icons for then Smile

/Mark
mark76uk
Member
***


0
111 posts 17 threads Joined: Feb 2003
02-26-2003, 12:40 PM -
#30
'One last try' syndrome took over me and I think I found a solution. Try this code which relys on aws' gif icon names!

This demo code includes just two of their icon names, 'nt_partlycloudy' and 'partlycloudy'. Any icon prefixed with 'nt_' is going to be night, so this can be looked for to make Weather Monitor display a night icon! It may take you a while to collect the icon names for all the night and day weather conditions!

Code:
[options]
name = Night Or Day Weather
starturl=http://www.wunderground.com/
SendCookies = 0

[Conditions]
find0 = "<table border=0 cellspacing=0 cellpadding=2 bgcolor="ccccff" width="100%">"
find1 = "<img src="icons/"
delim = ".GIF"

[Sun]
nt_partlycloudy

[Rain]
partlycloudy
this file is also attached

<phew>
/Mark Smile


Forum Jump:


Users browsing this thread: 1 Guest(s)