some+script

         set WshShell = CreateObject("WScript.Shell")

         WshShell.Run "BFactory"

For i=0 To 11 
            if i>5 Then 
              Exit For
            end if 
           Log.Message(i)

 Next


Sub main   
Set WshNetwork = CreateObject("WScript.Network")
Log.Message(WshNetwork.UserDomain)
Log.Message(WshNetwork.ComputerName)
Log.Message(WshNetwork.UserName)
end sub 


Rem Comment on a line with no code; no colon is needed. 


Sub main   
On Error Resume Next
Err.Raise 6   '抛出异常 Raise an overflow error。


Log.Message "Error # " & CStr(Err.Number) & " " & Err.Description
Err.Clear   ' Clear the error.
end sub 



Dim Counter
Counter = 0   ' Initialize variable.
While Counter < 20   ' Test value of Counter.
   Counter = Counter + 1   ' Increment Counter.
   Alert Counter
Wend   ' End While loop when Counter > 19.


vbCr

Chr(13)

Carriage return.

VbCrLf

Chr(13) & Chr(10)

Carriage return–linefeed combination.

vbFormFeed

Chr(12)

Form feed; not useful in Microsoft Windows.

vbLf

Chr(10)

Line feed.

vbNewLine

Chr(13) & Chr(10) or Chr(10)

Platform-specific newline character; whatever is appropriate for the platform.

vbNullChar

Chr(0)

Character having the value 0.

vbNullString

String having value 0

Not the same as a zero-length string (""); used for calling external procedures.

vbTab

Chr(9)

Horizontal tab.

vbVerticalTab

Chr(11)

Vertical tab; not useful in Microsoft Windows.


阅读更多
个人分类: VBS
想对作者说点什么? 我来说一句
加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭