- Aug
- 2,028
- 82
Ref : SCRIPT and GetObject
Ref: Using VBScript functions from TCC22
Version 2022-12-31
Added VB command.
The VB Command allows you to run a VBScript command, or commands.
Examples:
The VB command takes what you enter on the command line,
and wraps it into the following script;
The generated script then simply calculates your command line argument,
and sends the result to STDOUT.
----------------------------------------------------------------------
Version 2022-12-29
Initial Release.
AScript is the only command at this time.
Unlike the internal TCC Script command,
AScript works with GetObject.
Examples:
Now, run the above script;
AScript allows one to use Windows Scripting Components in their script;
Ref: Using VBScript functions from TCC22
Code:
plugin /i ActiveScript
Module: e:\utils\ActiveScript.dll
Name: ActiveScript
Author: Joe Caverly
Email: [email protected]
Web: https://www.twitter.com/JoeC4281
Description: ActiveScript - TCC Plugin written using Purebasic
Implements: AScript, VB
Version: 2022.12 Build 31
Version 2022-12-31
Added VB command.
The VB Command allows you to run a VBScript command, or commands.
Examples:
Code:
R:\>vb 2022-1957
65
R:\>vb CreateObject("Shell.Application").ToggleDesktop
R:\>vb DateDiff("d", "03/11/1957", Now) / 365.25
65.8069815195072
The VB command takes what you enter on the command line,
and wraps it into the following script;
Code:
vbs = ~""
vbs + ~"dim fso:"
vbs + ~"set fso=CreateObject(\"Scripting.FileSystemObject\"):"
vbs + ~"set stdout=fso.GetStandardStream(1):"
vbs + ~"Function OutStd(txt):"
vbs + ~"stdout.WriteLine txt:"
vbs + ~"End Function:"
vbs + ~"OutStd("
vbs = vbs + theScript
vbs + ~")"
The generated script then simply calculates your command line argument,
and sends the result to STDOUT.
----------------------------------------------------------------------
Version 2022-12-29
Initial Release.
AScript is the only command at this time.
Unlike the internal TCC Script command,
AScript works with GetObject.
Examples:
Code:
TestIt()
Function TestIt
Set fso = CreateObject ("Scripting.FileSystemObject")
Set stdout = fso.GetStandardStream (1)
Set iWMI = GetObject("WinMgmts:Root\Cimv2")
Set colItems = iWMI.ExecQuery("SELECT * FROM Win32_Process")
If Err.number <> 0 Then
stdout.WriteLine "Error"
End if
Results = ""
For Each objItem in colItems
Results = Results + objItem.Name + vbCrLf
Next
TestIt = Results
stdout.WriteLine TestIt
End Function
Now, run the above script;
Code:
AScript e:\utils\vince.vbs
System Idle Process
System
Secure System
Registry
smss.exe
...
AScript allows one to use Windows Scripting Components in their script;
Code:
Set oMath = GetObject("script:e:\utils\math.wsc")