Samurize Scripts

has anyone had problems with the uktv.txt file? it seems to save it in a different place each time, sometimes in the config folder and sometimes in the main samurize folder, have to keep fiddling with it to fix it :(
 
Originally posted by Shotgun_ned
has anyone had problems with the uktv.txt file? it seems to save it in a different place each time, sometimes in the config folder and sometimes in the main samurize folder, have to keep fiddling with it to fix it :(
Once, fixed itself after a restart
 
Originally posted by Discotheque
Does anyone else find that when the news script updates itself, it completely bogs the system down?

Is there a work around?

yep, just munches on the resources, not sure why, but its only for like 10 secs, can put up with that i suppose
 
Working my way through this thread..starte don something for myself. Im trying to make it look art deco, but I am having trouble finding the right kind of pictures, and icons for it. I want to find some high res art deco posters but cant seem to find any.

Back to work..:)
 
Originally posted by PAC2003
IceBus

do you have MSN?

mine is [email protected]

could you contact me, i cant seem to get the weather (cant change to my area) or channel info working.....

Thanks

Also BigBadBenny, would you be able to send me your cs script? if you want to that is :o :)

To change the weather to your area, open the weather.vbs file and read through the instructions of where to find the URL you need on the BBC website, then enter it into the VBS file. Whats the prob with channel info?
 
Originally posted by Shotgun_ned
has anyone had problems with the uktv.txt file? it seems to save it in a different place each time, sometimes in the config folder and sometimes in the main samurize folder, have to keep fiddling with it to fix it :(

I had this problem. In the script find the line

Set f=fs.CreateTextFile("UKTV.txt",true)

and change it to

Set f=fs.CreateTextFile("C:\Program Files\Samurize\UKTV.txt",true)

then it will always be in the sam folder....

or you can change the path to wherever you like.
 
Originally posted by Shotgun_ned
yep, just munches on the resources, not sure why, but its only for like 10 secs, can put up with that i suppose

It does that because the functions which display the text for the news stories wait 10 seconds (to give the function which pulls the html back time to finish). Since VBscript doesn't the DoEvents statement which enables control to pass back to the operating system, it munches 100% of CPU whilst it's waiting those 10 seconds.

The only other option (which would be better IMO) would be to take out the 10 second wait, in which case the new stories would only update on the subsequent time the function was called (i.e. only 1 minute later if you run them every minute).
 
Originally posted by PAC2003
I cant seem to get the buttons working? like in IceBus's setup, even when I link it to iexplorer.exe nothing happens?
Hyperlinks will not work if your config is pinned to the desktop.
 
This program is great......

Thanks BigBadBenny for his help.....I'm slowly getting there, added my CS info, and a few other little things... Only thing which is confusing me is the Icon, they dont select?...

Hmmmm

oh and sleepy it isnt pinned to desktop either...
 
Originally posted by Selekt0r
It does that because the functions which display the text for the news stories wait 10 seconds (to give the function which pulls the html back time to finish). Since VBscript doesn't the DoEvents statement which enables control to pass back to the operating system, it munches 100% of CPU whilst it's waiting those 10 seconds.

The only other option (which would be better IMO) would be to take out the 10 second wait, in which case the new stories would only update on the subsequent time the function was called (i.e. only 1 minute later if you run them every minute).

How would I go about doing that? :)
 
Originally posted by Discotheque
How would I go about doing that? :)

edit the script to remove the lines which look something like:

enter_time = Timer
leave_time = Timer
While (enter_time + start_delay > leave_time)
leave_time = Timer
Wend

in function GetText_
 
Code:
Function GetText_(ini,Fin,ofset)
	Dim html	
	enter_time = Timer
	leave_time = Timer
	While (enter_time + 10 > leave_time)
		leave_time = Timer
	Wend
	tmpfile = "bbc.tmp"
	set fs=CreateObject("Scripting.FileSystemObject")
	if fs.fileexists(tmpfile) then
		set f=fs.OpenTextFile(tmpfile,1)
		data = f.readall
		f.close
	else
		error = "Unable to open bbc.tmp"
	end if
	set f=nothing
	set fs=nothing
	html = data
	html = start_(html,ini,ofset)
	html = endd_(html,fin,0)
	GetText_ = TrimHTML_(html)
End Function

I removed lines 2-5 and that didnt work, what specifically should I remove? :)
 
Here is the bbc sport script if anyone wants it. It works the same way as the news one, except points to the bbc sports page and the lines it has to pull off are ammended. :)
 
I've got 3 scripts that write text files, I've checked all 3 and found they've been written to many locations. So to force them to be written to where I want 'em I've changed the code:

From
Code:
Set f=fs.CreateTextFile("UKDIGTV.txt",true)
To
Code:
Set f=fs.CreateTextFile("c:\program files\samurize\UKDIGTV.txt",true)
Also I couldn't figure out how to get 8 channels from the radio times so I have to run 2 scripts to get my TV guide. This isn't very elegant and is wasteful of bandwidth. Anyone got a better idea.
 
Latest version

Screen800b.jpg


Full Size Here
 
Last edited:
Originally posted by Sleepy
Also I couldn't figure out how to get 8 channels from the radio times so I have to run 2 scripts to get my TV guide. This isn't very elegant and is wasteful of bandwidth. Anyone got a better idea.

If you're using my script, open it in a text editor and you'll see blocks of code near the bottom that look like this:

---
If match.SubMatches(0) = "BBC 1" Then
outfile.write match.SubMatches(0) & VbNewLine & match.SubMatches(1) & Separator & match.SubMatches(2) & etc. etc.
outFile.WriteLine
End If
---


You need a block of the above code for each channel you want to get listings for as these are what write to the text file. So copy & paste until you meet your requirement, although you can only have a max. of 13 channels. You will need to change the channel name in each code block, and these can be any of the following (type exactly as below):

BBC 1, BBC 2, ITV 1, Channel 4, five, ITV2, BBC Three, Sky 1, Granada Plus, UK Gold, Paramount, Nat Geographic, UK Horizons, Discovery, Sky News, UK Style, Bravo, E4, Men and Motors, MTV, Cartoon Network, Nickelodeon

I hope that helps.... :)


Andy.
 
Last edited:
Back
Top Bottom