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

Windows 腳本宿主  

ProcessID 屬性

用 WshScriptExec 對(duì)象啟動(dòng)的過程的 ID (PID)。

Object.ProcessID

參數(shù)

Object
WshScriptExec 對(duì)象。

說明

可以使用 ProcessID 屬性來激活應(yīng)用程序(作為 AppActivate 方法的參數(shù))。

示例

下面的代碼使用 ProcessID 屬性來激活計(jì)算器和筆記本應(yīng)用程序。

[VBScript]
Sub delayedSendKeys(str)
     WScript.Sleep 100
     WshShell.SendKeys str
End Sub

Dim WshShell, oCalc, oNotepad
Set WshShell = CreateObject("WScript.Shell")
Set oCalc = WshShell.Exec("calc")
Set oNotepad = WshShell.Exec("notepad")
WScript.Sleep 500

WshShell.AppActivate oCalc.ProcessID
delayedSendKeys "1{+}1~"
delayedSendKeys "^C"
delayedSendKeys "%{F4}"

WshShell.AppActivate oNotepad.ProcessID
delayedSendKeys "1 {+} 1 = ^V"
[JScript]
function delayedSendKeys(str)
{
     WScript.Sleep(100);
     WshShell.SendKeys(str);
}

var WshShell = new ActiveXObject("WScript.Shell");
var oCalc = WshShell.Exec("calc");
var oNotepad = WshShell.Exec("notepad");
WScript.Sleep(500);

WshShell.AppActivate(oCalc.ProcessID);
delayedSendKeys("1{+}1~");
delayedSendKeys("^C");
delayedSendKeys("%{F4}");

WshShell.AppActivate(oNotepad.ProcessID);
delayedSendKeys("1 {+} 1 = ^V");

請(qǐng)參閱

WshScriptExec 對(duì)象 | AppActivate 方法