SendKeys可以输入变量吗?例如
Set ws = CreateObject("WScript.Shell")
Set TypeThis = I Want it to type whats here
ws.SendKeys [I want it to type the variable(TypeThis]
ws.SendKeys "{ENTER}"
Wscript.sleep 100
答案 0 :(得分:0)
只需将变量作为参数传递给set
方法。如果要为变量赋值,则不应使用关键字Set ws = CreateObject("WScript.Shell")
typeThis = "I Want it to type whats here"
ws.SendKeys typeThis
WScript.sleep 1000
。仅在要为对象分配引用时使用它。
//FieldController
public ActionResult Field()
//Views
Field