Added in 1.9.4
/comopen name progid
Opens a COM connection to object progid and assigns the connection a name.
For 64 bit AdiIRC, MSScript com objects is not available unless you install https://github.com/tablacus/TablacusScriptControl/releases.
Parameters
name - Connection name.
progid - ProgId to open. (e.g Excel.Application)
Added in 1.9.4
/comclose name
Closes the specified COM connection.
Parameters
name - Connection name.
Added in 1.9.4
/comlist
Lists all open COM connection.
Added in 1.9.4
/comreg -u filename
Registers/unregisters a COM DLL with windows.
Switches
-u - Unregister instead of register.
Parameters
filename - DLL filename to unregister/register.
Added in 1.9.4
$com(name|N)
Returns name if connection is open, or name of Nth connection. N = 0 returns number of open connections.
Parameters
name|N - The connection name or the Nth connection.
Properties
.progid - The object name.
.result - The value returned by the COM object member after the call
.error - The error code if any.
.errortext - The error text if any.
.argerr - TODO
.dispatch - $true if this is a dispatch pointer.
.unknown - $true if this is a unknown pointer.
$com(name, &bvar)
Returns connection information for the connection and puts it into &bvar.
Parameters
name|- The connection name.
&bvar - The &bvar to write to.
Properties
.progid - The object name.
.result - The value returned by the COM object member after the call
.error - The error code if any.
.errortext - The error text if any.
.argerr - TODO
.dispatch - $true if this is a dispatch pointer.
.unknown - $true if this is a unknown pointer.
$com(name/N,varname)
Returns value of the specified variable name.
Parameters
name/N - The connection name or the Nth connection.
varname - Name of the referenced variable.
$com(name,member,method,type1,value1,...,typeN,valueN)
This calls a member of an open COM connection with the specified method and parameters.
Returns: 1 = ok, 0 = fail.
Parameters
name - Connection name.
member - Member name.
method - Combination of the following values added together:
1 = DISPATCH_METHOD 2 = DISPATCH_PROPERTYGET 4 = DISPATCH_PROPERTYPUT 8 = DISPATCH_PROPERTYPUTREF
VB equivalents are: boolean, byte, currency, date, double, integer, long, single, string, variant. To make a variable by reference, use * in the type name, eg. i1* To assign a name to a variable for later reference after a call, append it to the type, eg. i1* varname When using a variant you must also specify the variable type after it, eg. variant bool.
Added in 1.9.4
$comcall(name,alias,member,method,type1,value1,...,typeN,valueN)
This calls a member of an open COM connection with the specified method and parameters.
Uses the same format as $com() apart from the alias. It is multi-threaded so it will not halt the script and will call the specified alias once the call returns.
Returns: 1 = ok, 0 = fail.
Parameters
name - Connection name.
alias - Alias to call when the call is finished.
member - Member name.
method - Combination of the following values added together:
1 = DISPATCH_METHOD 2 = DISPATCH_PROPERTYGET 4 = DISPATCH_PROPERTYPUT 8 = DISPATCH_PROPERTYPUTREF
VB equivalents are: boolean, byte, currency, date, double, integer, long, single, string, variant. To make a variable by reference, use * in the type name, eg. i1* To assign a name to a variable for later reference after a call, append it to the type, eg. i1* varname When using a variant you must also specify the variable type after it, eg. variant bool.
Added in 1.9.4
$comerr
This should be checked after a call to any COM command or identifier. Returns 1 if there was an error, else 0.
Added in 1.9.4
$comval(name,N,member, [&binvar])
Returns COM member value for the Nth instance of the enumerated collection in name.
Parameters
name - Name of the COM connection.
N - If N = 0, return number of items, otherwise The Nth item.
member - Member value to get.
[&binvar] - Adds the result to the specified &binvar instead. (changes return value to number of bytes added)
Properties
.result - Used with [&binvar].