Jem make sure that the path to your client is correct AND yor email addy is correct also. thats about all I can think of right now.
Right ...... Below is my VERY poorly reconstructed SETIProgress2.vbs file. THIS WORKS FOR ME. Including the SETIProgress function.
As a caveat I do have other .vbs scripts running. If you have then check that none of the variables are duplicated in those and this script as they are (I think) declared globally so this WILL cause you problems.
All rights are given for you to laugh at my naff rewrite. Doubles and longs have temporarily (sp?) been removed to get working and consider the bits I have rewritten as TOTAL BETA as I have NOT fully tested [ yet heh
]
Sp!ke.....
[edit] Just noticed BEWARE THE LINE BREAKS / WRAPS I will host and post a link a bit later to the file off of my site. [/edit]
<----------------------- okies cut here --------------------------------->
' SETIProgress v2.1 - 03-03-10
' For use with Serious Samurize
http://www.samurize.com
' By Micke_ , Original V1,0 By Dex,
[email protected]
'
' Send bugs/sugestions to :
[email protected]
'
' 2,0, Converted to Serious Samurize
' Fixed bug that script locked when seticlient updating.
' 2.1, Added webstat from seti@home.
'
' Dex, mail me if you want me ro remove youre part of this script.
' If I don't answer, ask Sweetfish to remove this script.
[email protected]
'
' POORLY EDITED BY SPIKE
path = "C:\seti@home\" ' Path to seti@home client Dont forget the LAST backslash
dec = "2" ' How much Decimals you want
printout = "pd%btg%btt"
' pd = % done.
' tg = time to go.
' tt = total time for this unit.
' %b = Same as samurize, line feed
' Settings for Seti webstat, gets info from
'
http://setiathome.ssl.berkeley.edu/fcgi-bin/fcgi?cmd=user_xml&email=XXXX
' (where XXXX is your registered email address)
' (The info from webpage are updated ones per hour)
' This script makes a tempfile (setiprogress2.tmp in youre temp folder.
email = "XXXX@XXXX" ' The Email registerd for youre account.LEAVE THE QUOTE MARKS!!!!!
result = "<name>%b%bTotal WU's: <numresults>%bCPU Time: <cputime>%bLast Result: <lastresulttime>"_
& "%bRank: <rank>%bUsers With same rank: <num_samerank>%bStomped Users: <top_rankpct>%"_
& ""
' %b = Same as samurize, line feed
' You can add text, E.g. <resultsperday>/day
' The folowing tag's are replaced with the info from seti@home
' Tag E.g. result
'<name> Micke_
'<numresults> 16788
'<cputime> 15.546 years
'<avecpu> 8 hr 06 min 42.0 sec
'<resultsperday> 12.13
'<lastresulttime> Mon Mar 10 09:29:03 2003
'<regdate> Thu May 27 06:41:00 1999
'<usertime> 3.790 years
'<rank> 3910
'<ranktotalusers> 4288359
'<num_samerank> 2
'<top_rankpct> 0.091
'==========================================================================
'dont change anything below!!! unless u wanna fix it
Function SETIProgress
tp = path & "state.sah" ' Generates the path to the file
Set file_obj = CreateObject ("Scripting.FileSystemObject")
If (file_obj.FileExists(tp)) Then
Set file_path = file_obj.GetFile(tp) ' Creates the connection to the file
if file_path.size > 200 then
Set file = file_path.OpenAsTextStream (1, -2) ' Opens the file for reading
statetmp = file.ReadAll & vbcrlf & vbcrlf & vbcrlf & vbcrlf & vbcrlf & vbcrlf & vbcrlf & vbcrlf
file.Close ' Closes the file
Set file_path = nothing ' Resets variable
Set file_obj = nothing ' Resets variable
tpx = split(statetmp, vblf)
prog = Mid(tpx(4), 6)
progtmp = prog * 100
progtmp = Round(progtmp,dec)
done = progtmp & "%"
cpu = Mid(tpx(3), 5)
prog = Mid(tpx(4), 6)
totaltimetmp = cpu / prog
timelefttmpA = ( totaltimetmp / 100 ) * progtmp
timelefttmp = totaltimetmp - timelefttmpA
hours = Fix(timelefttmp / 3600)
minutes = Fix( ( (timelefttmp / 3600) - hours) * 60)
seconds = Fix( ( ( ( (timelefttmp / 3600) - hours) * 60) - minutes)*60)
timetogo = hours & "h " & minutes & "m " & seconds & "s"
cpu = Mid(tpx(3), 5) ' OK This works now
prog = Mid(tpx(4), 6) ' leave me alone
totaltimetmp = cpu / prog
hours = Fix(totaltimetmp / 3600)
minutes = Fix( ( (totaltimetmp / 3600) - hours) * 60)
seconds = Fix( ( ( ( (totaltimetmp / 3600) - hours) * 60) - minutes)*60)
tottime = hours & "h " & minutes & "m " & seconds & "s"
pout = replace(printout, "%b", vbcrlf)
pout = replace(pout, "pd", done)
pout = replace(pout, "tg", timetogo)
SETIProgress = replace(pout, "tt", tottime)
else
Set file_path = nothing ' Resets variable
Set file_obj = nothing ' Resets variable
SETIProgress = "0%" & vbcrlf & "updating"
end if
Else
SETIProgress = "File not found." & vbcrlf & vbcrlf
End If
End Function
Function results
Set fso = CreateObject("Scripting.FileSystemObject")
set readfile = fso.OpenTextFile(path & "user_info.sah", 1)
rezread = split(readfile.ReadAll, "results=")
readfile.close
rez = split(rezread(1), vblf)
results= rez(0)
set readfile = nothing
Set fso = nothing
End Function
Function Setionline
Set envcheck = CreateObject("wscript.shell")
set wshenv = envcheck.environment("process")
tmppath = (wshenv("TEMP"))
set wshenv = nothing
set envcheck = nothing
Set fso = CreateObject("Scripting.FileSystemObject")
if fso.fileExists(tmppath & "\setiprogress2.tmp") then
set tmpfile = fso.getfile(tmppath & "\setiprogress2.tmp")
lud = tmpfile.datelastmodified
set tmpfile = nothing
end if
if lud < cdate(date() & " " & time) - 0.0416 then
set gw = createobject("msxml2.xmlhttp")
gw.open "GET","
http://setiathome.ssl.berkeley.edu/fcgi-bin/fcgi?cmd=user_xml&email=" & email & "&bogus=" & time,false
gw.send
set savefile = fso.CreateTextFile(tmppath & "\setiprogress2.tmp", True)
savefile.write gw.responsetext
set gw = nothing
savefile.close
set savefile = nothing
end if
set savefile = fso.OpenTextFile(tmppath & "\setiprogress2.tmp", 1)
rez = savefile.readall
savefile.close
set savefile = nothing
set fso = nothing
if instr(rez, "<name>") then
name = trim (mid (rez, (instr (rez, "new") + 5), (instr(rez,"</a></name>") -(instr (rez, "new") + 5))))
numresults = trim (mid (rez, (instr (rez, "<numresults>") + 12), (instr(rez,"</numresults>") -(instr (rez, "<numresults>") + 12))))
cputime = trim (mid (rez, (instr (rez, "<cputime>") + 9), (instr(rez,"</cputime>") -(instr (rez, "<cputime>") + 9))))
avecpu = trim (mid (rez, (instr (rez, "<avecpu>") + 8), (instr(rez,"</avecpu>") -(instr (rez, "<avecpu>") + 8))))
resultsperday = trim (mid (rez, (instr (rez, "<resultsperday>") + 15), (instr(rez,"</resultsperday>") -(instr (rez, "<resultsperday>") + 15))))
lastresulttime = trim (mid (rez, (instr (rez, "<lastresulttime>") + 16), (instr(rez,"</lastresulttime>") -(instr (rez, "<lastresulttime>") + 16))))
rank = trim (mid (rez, (instr (rez, "<rank>") + 6), (instr(rez,"</rank>") -(instr (rez, "<rank>") + 6))))
ranktotalusers = trim (mid (rez, (instr (rez, "<ranktotalusers>") + 16), (instr(rez,"</ranktotalusers>") -(instr (rez, "<ranktotalusers>") + 16))))
top_rankpct = trim (mid (rez, (instr (rez, "<top_rankpct>") + 13), (instr(rez,"</top_rankpct>") -(instr (rez, "<top_rankpct>") + 13))))
num_samerank = trim (mid (rez, (instr (rez, "<num_samerank>") + 14), (instr(rez,"</num_samerank>") -(instr (rez, "<num_samerank>") + 14))))
regdate = trim (mid (rez, (instr (rez, "<regdate>") + 9), (instr(rez,"</regdate>") -(instr (rez, "<regdate>") + 9))))
usertime = trim (mid (rez, (instr (rez, "<usertime>") + 10), (instr(rez,"</usertime>") -(instr (rez, "<usertime>") + 10))))
result = replace(result, "%b", vbcrlf)
result = replace(result, "<name>", name)
result = replace(result, "<numresults>", numresults)
result = replace(result, "<cputime>", cputime)
result = replace(result, "<avecpu>", avecpu)
result = replace(result, "<resultsperday>", resultsperday)
result = replace(result, "<lastresulttime>", lastresulttime)
result = replace(result, "<regdate>", regdate)
result = replace(result, "<usertime>", usertime)
result = replace(result, "<rank>", rank)
result = replace(result, "<ranktotalusers>", ranktotalusers)
result = replace(result, "<num_samerank>", num_samerank)
result = replace(result, "<top_rankpct>", 100-top_rankpct)
else
result = "Username not found" & vbcrlf & "Have you changed the mail" & vbcrlf & "address in setiprogress.vbs?"
Set fso = CreateObject("Scripting.FileSystemObject")
fso.deleteFile(tmppath & "\setiprogress2.tmp")
set fso = nothing
end if
setionline = result
'msgbox result
End function
' /Micke_