欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Windows 腳本宿主  

Read 方法

從輸入流返回指定數(shù)量的字符。

object.Read(characters) 

參數(shù)

object
StdIn 文本流對象。
characters
表示要讀取的字符數(shù)的整數(shù)值。

說明

Read 方法返回一個字符串。StdIn、StdOut 和 StdErr 屬性與方法只在用 CScript.exe 主機可執(zhí)行文件運行腳本時奏效。用 WScript.exe 運行腳本時返回錯誤。從當前的位置指針所在的位置開始讀取并一次向前移動一個字符。

在按 enter 鍵之前,Read 方法不返回任何字符串。所返回的只是被請求的字符數(shù)。任何其他字符都將只在以后調(diào)用 Read、ReadLine 或 ReadAll 方法時返回。

示例

下面的代碼使用 Read 方法從鍵盤獲得字符,并在控制臺顯示。

[VBScript]
Dim Input
Input = ""

Do While Not WScript.StdIn.AtEndOfLine
   Input = Input & WScript.StdIn.Read(1)
Loop
WScript.Echo Input
[JScript]
var input = "";
while (!WScript.StdIn.AtEndOfLine)
{
   input += WScript.StdIn.Read(1);
}
WScript.Echo(input);

請參閱

StdIn 屬性 (WScript)