home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC/CD Gamer UK 45
/
PCGAMER45.bin
/
netware
/
msie4pp
/
wsh.cab
/
excel.vbs
< prev
next >
Wrap
Text File
|
1996-10-15
|
1KB
|
56 lines
' Windows Script Host Sample Script
'
' ------------------------------------------------------------------------
' Copyright (C) 1996 Microsoft Corporation
'
' You have a royalty-free right to use, modify, reproduce and distribute
' the Sample Application Files (and/or any modified version) in any way
' you find useful, provided that you agree that Microsoft has no warranty,
' obligations or liability for any Sample Application Files.
' ------------------------------------------------------------------------
Dim oXL
Set oXL = WScript.CreateObject("Excel.Application")
oXL.Visible = TRUE
oXL.WorkBooks.Add
Dim nIndex
nIndex = 1
Sub Show(pszDesc, pszValue)
oXL.Cells(nIndex, 1).Value = pszDesc
oXL.Cells(nIndex, 2).Value = pszValue
nIndex = nIndex + 1
End Sub
'
' Put WScript properties
'
Show "Application Friendly Name", WSCript.Name
Show "Application Version", WSCript.Version
Show "Application Context: Fully Qualified Name", WSCript.FullName
Show "Application Context: Path Only", WSCript.Path
Show "State of Interactive Mode", WSCript.Interactive
Dim oArgs
Set oArgs = WScript.Arguments
oXL.Cells(nIndex, 1).Value = "argc"
oXL.Cells(nIndex, 2).Value = oArgs.Count
nIndex = nIndex + 1
for i = 0 to oArgs.Count - 1
oXL.Cells(nIndex, 1).Value = "argv[" & CStr(i) & "]"
oXL.Cells(nIndex, 2).Value = oArgs(i)
nIndex = nIndex + 1
next