如何在 VBScript 中使用别名?我正在尝试以下代码:
AliasesExample
Sub AliasesExample
Dim AliasObj
' Obtains the object that corresponds to the Notepad main window
Set AliasObj = Aliases.notepad.wndNotepad
' Checks whether the specified window exists
If AliasObj.Exists Then
' Enters text in the Notepad editor
AliasObj.Keys("Hello, world.")
Else
Log.Error("Notepad is not running.")
End If
End Sub
但出现以下错误:
object required: 'Aliases'