Samurize Scripts

Has anybody got a nice png for the news?

Don't like the man/woman type icons, I don't think they suit it.

Ta.
 
can't remember exactly how i did the TV, it was somewhere in this thread....

there was the acutual script that runs in the background that should be updated, well every 15ish mins...

and then the words/times that just read from a text file...
 
Originally posted by Sleepy
Search this thread for some links to news scripts and weather scripts. Note some news scripts will require modifying

For clickable items any Meter can be linked by enabling Allow Meter Linkage. Note wont work if you've pinned it to the desktop. To enable an image to be linkable place an empty text file over it and enable that instead.

You've slightly lost me there :| I haven't played around with Text files as yet so have little to no idea how to do that.

Whats the exact procedure for using a text file to link an image to a program?

Same deal for news and weather, I don't know how to use the contents of the zips people have used for theirs.

I'll happily zip it when it's done, but I'll need to sort all the images out so they run from in the folder and not all over my HDD :)

Thanks.

Peter
 
umm my one...

if u download it and chuck it all in program file should work...

i'd go into config.exe and then load the ini file and look how it was put together would be the best bet really....
 
Right, as promised - the BBC weather script now provides images support:

bbc_weather.jpg


pick up the new version here

Please read the readme carefully as there are a few critical differences to the previous versions. In particular, you must use an 'instance name' in the command line which you use to start the Samurize client, and you must update the variable instance_name in the script to match that. This ensures that when the Samurize client is restarted (to update the weather symbols) that the correct client.exe is closed - to avoid any problems with Opera browser which some have mentioned.

I had all sorts of grief when trying to restart client.exe in the same way as other scripts have used (by sending Alt+F4 to the application), so I've chosen an alternative method which I believe is much more reliable. I've included a small command line application called KillProc.exe which is called by the script to kill the existing Client.exe - this avoids any problems with the wrong application being closed in error because you happened to be switching tasks when the script was run by Samurize.

As killproc.exe was compiled using VB.NET, you may well need to have the Microsoft .NET framework installed (you probably have already if you keep up to date with Windows Update).

I've only had chance to test it under WinXP with SP1 and .NET framework installed - let me know if you have any problems with it under different setups.

Enjoy... :cool:
 
This is my first effort !! Go easy on me please im a samurize n00b ! :)

desktop.JPG


Sorry about the size, i have pretty much roxored the ideas off everyone elses !! :p
 
Selekt0r...

Excellent work on the new script, looks good! :D

However, I have a question about the previous one (sorry). I wanted to grab the time current observations were taken so I could display something like:

Current temp. 22C, observed at 1500hrs

To do this, I added a line to grab a new parameter to the others at the top using:

Code:
html=replace(html,"Observed at ","OBSERVED:",1,1)
and then to strip the date from the time (the grabbed value is in the format 150018/04/03) I added a few line to the "write_registry_" function which was this:

Code:
If w_object = "OBSERVED:" Then
    w_obj_value = Left(w_obj_value,InStr(w_obj_value,"/")-3)
End If
Now although a new value with the correct time data is being added to the registry, and the parameter can be used in Samurize, it still returns 'Error' when I click 'Test Script' in the config editor.

So the question is, what did I do wrong? :)

Thanks a lot!


Andy.
 
Last edited:
Its reporting an error cos the count of registry writes is not what it expects. Change the value in this line
Code:
If regwrite_ok = 50 Then
         writefile_weather = "Registry written"
Else
         writefile_weather = "Error"
End If
 
Last edited:
Originally posted by BigBadBenny
I'm still having trouble with the TV Guide.

I have added all the channels I want and can output them to the UKTV.txt but cannot populate the linked text file.

I have added Const Path = "C:\Program Files\Samurize\UKTV.txt" to the link in that file but am at a miss to where to put the actual line to output the channel?

I know its something simple I'm missing here?

This is the UK/Sky dealage...
 
Originally posted by Sleepy
Its reporting an error cos the count of registry writes is not what it expects. Change the value in this line
Code:
If regwrite_ok = 50 Then
         writefile_weather = "Registry written"
Else
         writefile_weather = "Error"
End If

Yep - I think that would be the problem. When an error is returned it doesn't actually stop anything working, but just warns that something may not have been written correctly to the Registry.

I'll add the 'Observed at' bit into the next version. BTW - I'm not sure that the time_since_update function is working correctly as it always seems to return zero :confused: I'll have a look at it tomorrow.

I'm off to bed as I've been knocking walls down all day (don't ask...) - let me know if anyone manages to get the new script running OK ;):confused:
 
Thanks Sleepy & Selekt0r.

I did increase "regwrite_ok = 50" to 51, but it's still giving an error. Oh well, it works so I'll justc ignore it. :)


Andy.
 
Originally posted by Andy C
I did increase "regwrite_ok = 50" to 51, but it's still giving an error. Oh well, it works so I'll justc ignore it. :)
The version I d/l earlier allready had the wrong count It was 50 but should have been 51. So try 52 or count all the reg_write lines and see what it should be ;)
 
Originally posted by Sleepy
The version I d/l earlier allready had the wrong count It was 50 but should have been 51. So try 52 or count all the reg_write lines and see what it should be ;)

The newest version seems fine here, although your remedy worked for the previous. :)
 
Selekt0r - good work mate !!!

But I haven't installed it yet as it seem to be a bit tricky to config. I've got your old script running at the moment and it's fine, replacing it with the new one won't create any problems?

And what do you mean by

- Change the command line which starts your Samurize Client.exe to include an Instance Name (if it doesn't already have one).

e.g. "C:\Program Files\Samurize\Client.exe" "JMH"

The Instance Name should match that in the instance_name variable in bbc_weather.vbs. You *must* use an instance name in the command line to launch the Samurize client, otherwise you will end up with multiple (duplicate) clients running. The reason for doing this is to ensure that other applications which have the filename Client.exe (e.g. Opera browser) are not closed in error. Note that you may have to re-select your Samurize config file in the client if you change the Instance name.

What is an Instance Name?
 
Making slow headway here... Last thing I want to ask for the minute... With the weather thing, how do you get it to auto update the name of tomorrow, i.e. in BigBadBenny's above it says Forecast for Saturday and Sunday.

How do you get it to automatically say the correct day name?

Also, are there any scripts to countdown to a set date (i.e. so many days, hours, minutes seconds left)?

Thanks people :)

Peter
 
Back
Top Bottom