Ef ég opna þetta með notepad fæ ég:
Kóði: Velja allt
'CPU-Z script v 1.11
'Created by QuippeR (QuippeR@freemail.hu)
'Retrieving info from CPU-Z output file
'Thanks go to discipledoc for bugreport!
'----------------------------------------
'Get CPU-Z from http://www.cpuid.com
'Usage:
'cpuz.exe -file=c:\mydirectory\mysystem.htm : runs CPU-Z in ghost mode. Report file mysystem.htm is automatically generated in directory c:\mydirectory
'Please set this constant before using the script!
'CPU-Z outputs filename is:
FILENAME="C:\Program Files\Samurize\Scripts\clock.htm"
'Modify below this line only if you know what you do!
'----------------------------------------------------
CS = "CPU Clock Speed"
CM = "Clock multiplier"
FSBF = "Front Side Bus Frequency"
BS = "Bus Speed"
DRF = "DRAM Frequency"
function CPUClockSpeed()
CPUClockSpeed = getInfo(CS)
end function
function CPUClockSpeedInGHz(DigitsAfterDecimal)
temp = CPUClockSpeed()
temp = left(temp, instr(temp, ".")-1)
GHz = (temp*.001)
CPUClockSpeedInGHz = FormatNumber(GHz,DigitsAfterDecimal) & " GHz"
end function
function ClockMultiplier()
ClockMultiplier = getInfo(CM)
end function
function FrontSideBusFrequency
FrontSideBusFrequency = getInfo(FSBF)
end function
function BusSpeed
BusSpeed = getInfo(BS)
end function
function DRAMfrequency()
DRAMfrequency = getInfo(DRF)
end function
private function getInfo(text)
information = readfile()
if not (information = "Bad filename") then
information = right(information, len(information)-instr(information, text))
information = right(information, len(information)-instr(information, "<small>"))
information = left(information, instr(information, "</small>")-1)
information = right(information, len(information)-instrRev(information, ">"))
end if
getInfo = information
end function
'private function Number(str)
' temp = 0
' for i=1 to len(str)
' tmpstr = mid(str, i, 1)
' num = Asc(tmpstr) - Asc(0)
' temp = temp * 10 + num
' next
'
' Number = temp
'end function
private function readfile()
Set fs = CreateObject ("Scripting.FileSystemObject")
If (fs.FileExists(FILENAME)) Then
Set filePath = fs.GetFile(FILENAME)
set File = filePath.OpenAsTextStream (1, -2)
info = file.readall
File.Close
Set filePath = nothing
Set fs = nothing
Set File = nothing
Else
readfile = "Bad filename"
Exit Function
End If
readFile = info
end function
En mér tekst einhvernveginn ekki að skilja þetta. Hvernig á ég að virkja þetta?