xp-consoles/console.vbs

23 lines
626 B
Plaintext
Raw Normal View History

2021-11-11 00:48:13 +00:00
Option Explicit
On Error Resume Next
2022-10-09 21:26:11 +00:00
Sub VBSExecute(code)
2022-09-22 18:37:36 +00:00
Err.Clear
Execute "On Error Resume Next" & vbCrLf & code
2022-09-22 18:37:36 +00:00
If Err.Number <> 0 Then
2022-10-09 21:26:11 +00:00
console.error "VBScript Error " & Err.Number & " - " & Err.Source & ": " & Err.Description
2022-09-22 18:37:36 +00:00
End If
2021-11-11 00:48:13 +00:00
End Sub
2022-10-09 21:26:11 +00:00
Function VBSEval(code)
Err.Clear
VBSEval = Eval(code)
If Err.Number <> 0 Then
console.error "VBScript Error " & Err.Number & " - " & Err.Source & ": " & Err.Description
2022-09-22 20:14:19 +00:00
End If
2022-10-09 21:26:11 +00:00
End Function
2021-11-11 00:48:13 +00:00
'Auto-detect the wizard's browser extensions
2022-10-09 21:26:11 +00:00
Function InWebWizard()
2022-09-22 18:37:36 +00:00
InWebWizard = TypeName(window.external) = "INewWDEvents"
2022-10-09 21:26:11 +00:00
End Function