[eMule-Web]

[eMule-Web] (http://www.emule-web.de/board/)
-   eMule Signatur (http://www.emule-web.de/board/emule-signatur/)
-   -   OnlineSig & Samurize (http://www.emule-web.de/board/9914-onlinesig-samurize.html)

k3nny 22. August 2005 15:52

OnlineSig & Samurize
 
hi@all,
ich würde mir gerne die emule stats (up, down, server..das würde erstmal reichen :-) ) bei samurize anzeigen lassen.
ich hab zwar schon ein plugin gefunden, jedoch kann man komischerweise bei dem teil die werte nur in zahlen ausgeben lassen, nicht als graphen. und das nervt mich etwas...
falls jmd. eine lösung parat hat, bitte hier schreiben!
big thx!

hier ist das script, vllt kann ja jmd. was verbessern:
Code:

' Online Sig V0.4 by Alderaic
'ICQ #173174191
'alderaic@samurize.com http://alderaic.samurize.com
'This is not free to redistribute, please ask before doing so
'



OnlineSig = "D:\Programme\emule\onlinesig.dat"


Function Upload()

Set FSys = CreateObject("Scripting.FileSystemObject")
Set MonFic = FSys.OpenTextFile(OnlineSig, 1)
s = MonFic.Readline
s1 = len(s)
s = MonFic.Readline
s = right(s,len(s)-InStr(s,"|"))
s = left(s,InStr(s,"|")-1)
if (s1 = 1) or TimeDiff(OnlineSig) > 5 then
        Upload = 0
        else
        s = replace(s,",",".")
        Upload = trim(s)
end if

end Function

Function Download()

Set FSys = CreateObject("Scripting.FileSystemObject")
Set MonFic = FSys.OpenTextFile(OnlineSig, 1)
s = MonFic.Readline
s1 = len(s)
s = MonFic.Readline
s = left(s,InStr(s,"|")-1)
if (s1 = 1) or TimeDiff(OnlineSig) > 5 then
        Download = 0
        else
        s = replace(s,",",".")
        Download = trim(s)
end if
end Function

Function Queue()

Set FSys = CreateObject("Scripting.FileSystemObject")
Set MonFic = FSys.OpenTextFile(OnlineSig, 1)
s = MonFic.Readline
s1 = len(s)
s = MonFic.Readline
s = right(s,len(s)-InStr(s,"|"))
s = right(s,len(s)-InStr(s,"|"))
if (s1 = 1) or TimeDiff(OnlineSig) > 5 then
        Queue = 0
        else
        s = replace(s,",",".")
        Queue = trim(s)
end if
end Function

Function EmuleOn()

Set FSys = CreateObject("Scripting.FileSystemObject")
Set MonFic = FSys.OpenTextFile(OnlineSig, 1)
s = MonFic.Readline
s1 = len(s)
if (s1 = 1) or TimeDiff(OnlineSig) > 5 then
        EmuleOn = "Offline"
        else
        EmuleOn = "Online"
end if
               
end Function

Function Serveur()
Set FSys = CreateObject("Scripting.FileSystemObject")
Set MonFic = FSys.OpenTextFile(OnlineSig, 1)
s = MonFic.Readline
s1 = len(s)

if (s1 = 1) or TimeDiff(OnlineSig) > 5 then
        Serveur = "N/A"
        else
        S = right(s,len(s)-InStr(s,"|"))
        s = left(s,InStr(s,"|")-1)
        Serveur = s
       
end if
               
end Function


Function TimeDiff(file)
        dim fs,f,diff
        set fs=CreateObject("Scripting.FileSystemObject")
        if fs.fileexists(file) then
                set f=fs.GetFile(file)
                diff = datediff( "n", f.DateLastModified, now())
        else
                diff = 0
        end if
        set f=nothing
        set fs=nothing
        TimeDiff = diff
End Function


micha1963 5. September 2005 06:48

Das sollte funktionieren!

OnlineSig = "<yourpath>\onlinesig.dat"


Function Upload()

Set FSys = CreateObject("Scripting.FileSystemObject")
Set MonFic = FSys.OpenTextFile(OnlineSig, 1)
s = MonFic.Readline
s1 = len(s)
s = MonFic.Readline
s = right(s,len(s)-InStr(s,"|"))
s = left(s,InStr(s,"|")-1)
if (s1 = 1) or TimeDiff(OnlineSig) > 5 then
Upload = 0
else
s = replace(s,".",",")
Upload = trim(s)
end if

end Function

Function Download()

Set FSys = CreateObject("Scripting.FileSystemObject")
Set MonFic = FSys.OpenTextFile(OnlineSig, 1)
s = MonFic.Readline
s1 = len(s)
s = MonFic.Readline
s = left(s,InStr(s,"|")-1)
if (s1 = 1) or TimeDiff(OnlineSig) > 5 then
Download = 0
else
s = replace(s,".",",")
Download = trim(s)
end if
end Function

Function Queue()

Set FSys = CreateObject("Scripting.FileSystemObject")
Set MonFic = FSys.OpenTextFile(OnlineSig, 1)
s = MonFic.Readline
s1 = len(s)
s = MonFic.Readline
s = right(s,len(s)-InStr(s,"|"))
s = right(s,len(s)-InStr(s,"|"))
if (s1 = 1) or TimeDiff(OnlineSig) > 5 then
Queue = 0
else
s = replace(s,".",",")
Queue = trim(s)
end if
end Function

Function EmuleOn()

Set FSys = CreateObject("Scripting.FileSystemObject")
Set MonFic = FSys.OpenTextFile(OnlineSig, 1)
s = MonFic.Readline
s1 = len(s)
if (s1 = 1) or TimeDiff(OnlineSig) > 5 then
EmuleOn = "Off"
else
EmuleOn = "On"
end if

end Function

Function Serveur()
Set FSys = CreateObject("Scripting.FileSystemObject")
Set MonFic = FSys.OpenTextFile(OnlineSig, 1)
s = MonFic.Readline
s1 = len(s)

if (s1 = 1) or TimeDiff(OnlineSig) > 5 then
Serveur = "N/A"
else
S = right(s,len(s)-InStr(s,"|"))
s = left(s,InStr(s,"|")-1)
Serveur = s

end if

end Function


Function TimeDiff(file)
dim fs,f,diff
set fs=CreateObject("Scripting.FileSystemObject")
if fs.fileexists(file) then
set f=fs.GetFile(file)
diff = datediff( "n", f.DateLastModified, now())
else
diff = 0
end if
set f=nothing
set fs=nothing
TimeDiff = diff
End Function

k3nny 5. September 2005 12:34

@micha1963:
danke, aber das problem lag an dem punkt am ende der 3 zeilen. der musste durch ein komma ersetzt werden.
wie gesagt, trotzde thx für die mühe :) vbmenu_register("postmenu_94928", true);

srt10coupe 21. March 2006 17:41

könnt ihr mir einen link zu dem plugin für samurize senden um die onlinesig.dat einzubetten???
BITTE

micha1963 21. March 2006 22:50

@srt10coupe
einfach den Text von
OnlineSig =
bis
End Function
mit einem Texteditor kopieren und als OnlineSig.vbs speichern
editieren (<yourpath> = pfad zur onlinesig.dat im Muli) fertig.

srt10coupe 22. March 2006 18:08

danke micha1963 hat geklappt


Alle Zeitangaben in WEZ +1. Es ist jetzt 16:41 Uhr.

Powered by vBulletin® Version 3.8.3 (Deutsch)
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102