| | |
help with script
Please support our Existing Scripts advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2007
Posts: 276
Reputation:
Solved Threads: 37
Not sure if this is the right place or not, I'm trying to create a script to learn scripting better before editing the login script at work. I'm getting an error while trying to run this piece, can anyone tell me what's missing?
it's supposed to check running processes and information on my local machine
the error is line 1, char 1 expected statement, code 800a0400 source is Microsoft VBScript compilation error
if I take out first line it moves towards the end and get the same error
it's supposed to check running processes and information on my local machine
<SCRIPT LANGUAGE = "VBScript">
Sub window_onLoad
iTimerID = window.setInterval("GetInfo", 10000, "VBScript")
End Sub
Sub GetInfo
For i = (objTable.Rows.Length - 1) to 0 Step -1
myNewRow = document.all.objTable.deleteRow(i)
Next
Set objRow = objTableBody.InsertRow()
objRow.Style.fontWeight = "bold"
Set objCell = objRow.InsertCell()
objCell.InnerText = "Process ID"
Set objCell = objRow.InsertCell()
objCell.InnerText = "Process Name"
Set objCell = objRow.InsertCell()
objCell.InnerText = "Working Set Size"
strComputer = "ecancel2"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcesses = objWMIService.ExecQuery _
("SELECT * FROM Win32_Process")
For Each strProcess in colProcesses
Set objRow = objTableBody.InsertRow()
Set objCell = objRow.InsertCell()
objCell.InnerText = strProcess.ProcessID
Set objCell = objRow.InsertCell()
objCell.InnerText = strProcess.Name
Set objCell = objRow.InsertCell()
objCell.InnerText = FormatNumber(strProcess.WorkingSetSize,0,,,-1)
Next
End Sub
</SCRIPT>
<TABLE ID = "objTable">
<TBODY ID = "objTableBody">
</TBODY>
</TABLE>the error is line 1, char 1 expected statement, code 800a0400 source is Microsoft VBScript compilation error
if I take out first line it moves towards the end and get the same error
![]() |
Similar Threads
- Clean Previous Next Script for MySQL results (PHP)
- The name for the Resize Button to ad to Script (HTML and CSS)
- Random Programming Script (Computer Science)
- Importing SQL Script File - Urgent !! (Database Design)
- Script problems with IE (Web Browsers)
- Help with shell script to auto gzip a .sql dump after backup (Shell Scripting)
- Adding mutiple PC's to an OU via script? (Windows NT / 2000 / XP)
- Table of Contents Script (Java)
- ASP slow-down server script (ASP)
Other Threads in the Existing Scripts Forum
- Previous Thread: Need a tool to measure distance on virtual earth
- Next Thread: SVG? How can I create a SVG file?
| Thread Tools | Search this Thread |





