Samurize Scripts

Here's a couple of links to the news and TV scripts which sharkfood mentioned earlier:

news.zip

tvguide.zip

I seem to have the same problem with my BBC weather script not updating, although I'm sure it was yesterday. In fact I've got the same problem with the BBC news script too!?

They run fine when the config is first loaded/reloaded, but then none of the scripts are running again. I've even set them all to 1 minute and none of them are running at all apart from that initial time.

I'll look into it further....
 
This update is great. I've been using the .63 version for a while but this is such a great improvement.
Inspired (and aided) by this thread...

samurize.png


Just need to source some more appropriate iconage.
 
Originally posted by Selekt0r
Here's a couple of links to the news and TV scripts which sharkfood mentioned earlier:

news.zip

tvguide.zip


Just a quick fix, the tv script works much more reliably if you use a text file for each channel. This needs the splitfiles option in the tvguide.vbs file changing to:

Const splitfiles = true

Thanks to Selekt0r for hosting these files.
 
Originally posted by Selekt0r
They run fine when the config is first loaded/reloaded, but then none of the scripts are running again. I've even set them all to 1 minute and none of them are running at all apart from that initial time.

I'll look into it further....

If you're running the display meters from a text file (as opposed to directly off an active script meter), you need to have the active script on the screen somewhere for it to be referenced and generate/update the text file. Make sure there's only '%v' in the meter text properties Text box, so it's hidden after it runs.
 
Strange - I've rebooted and started again with a new config file (with just my new BBC Weather script at the moment), and it works (and updates) fine.

I've noticed that in my old/big config I have a red border around the active area, wheras in the new one I have a green - could this be anything to do with it?

Anyway, I've updated the BBC weather script to store its values in the Windows registry rather than a temp file. The new version is here

The advantage of doing this, is that you're not getting a small file being hammered by 20 VBscript calls at the same time, so CPU utilisation is tiny compared with previously.

The new script uses the same function names as before, so should just slot in instead of the old one. There is also a new function 'time_since_update' which returns the number of seconds since the values were last updated.

I'll keep testing it, but does anyone have any ideas re: the green/red border in the config editor?

*edit* well, after a reboot even the old config with everything in works and updates fine. I think it must be a Samurize glitch....
 
Last edited:
Originally posted by Selekt0r
I'll keep testing it, but does anyone have any ideas re: the green/red border in the config editor?

it just depends on the area you cover, red is when it seem to arbitrarily decide its "too big" and you get the performance warning in the status bar, green means it thinks total area is small enough



for anyone who wants word wrapped news items i did this function




Code:
Function WrapLines(text, num)
	Dim word, result
	Dim linelen
	Trim(text)
	result = ""
	linelen = 0
	While Len(text) > 0
		word = ""
		While Mid(text,1,1) <> " " and Len(text) > 0
			word = word & Mid(text,1,1)
			text = Mid(text,2, Len(text)-1)
		Wend
		if Len(text) > 0 then text = Mid(text,2, Len(text)-1)
		If (linelen > 0 and linelen + Len(word) + 1 > num) Then
			result = result & chr(13) & Chr(10) & word
			linelen = Len(word)
		Else
			If linelen > 0 Then
				result = result & " " & word
				linelen = linelen + Len(word) + 1
			Else
				result = word
				linelen = Len(word)
			End If
		End If
	Wend
	WrapLines = result
end function

if you insert it into the bbc news script and change the ExtractLine_ function to this

Code:
Function ExtractLine_(line)
	newsArr = split(GetText_ ("<a name=""startcontent"">", "<hr>", 0), "|")
	ExtractLine_ = WrapLines(Trim(newsArr(line)), 65)
	
end function

you will have word wrapped news items, you may want to change the 65 (the number of chars to allow per line) for whatever your font/look is


example of word wrapped news :D

 
Last edited:
with the red boarder if you look at the bottom bar in the config editor it should say "Warning total area to large, expect some porformance loss" so i would say for best usage try and keep it as a green box

hth

edit..... DOH! beaten to it by finn ;)
 
Last edited:
eidolon YGM, 3.6MB so took me a little while to upload cos i am only on a 1-way satellite connection with diallup for my upstream:)
 
Originally posted by Westwood
Finn, looks good m8, get rid of the recycle bin!! Ruins the dark colour scheme ;)

how? it seems to be the only bloody icon in xp you cant kill off the desktop ?
 
Last edited:
go to Run, type gpedit.msc then under user configuration chose Administrive Templates, then desktop then double click Remove Recycle Bin icon from desktop, and set it's status to enabled.
 
Back
Top Bottom