m |
|||
Line 1: | Line 1: | ||
'''$agent''' can be used to return information about your currently installed Microsoft Agent. | '''$agent''' can be used to return information about your currently installed Microsoft Agent. | ||
− | = Synopsis = | + | == Synopsis == |
<pre>$agent(<N|name>,[N])[.property]</pre> | <pre>$agent(<N|name>,[N])[.property]</pre> | ||
− | = Parameters = | + | == Parameters == |
<span style="display: inline-block; width: 60px;">'''N'''</span>This can be used to retrieve information about the Nth loaded Agent. If this paramter is 0, then mIRC will return the total number of installed agents. | <span style="display: inline-block; width: 60px;">'''N'''</span>This can be used to retrieve information about the Nth loaded Agent. If this paramter is 0, then mIRC will return the total number of installed agents. | ||
Line 11: | Line 11: | ||
<span style="display: inline-block; width: 60px;">'''[N]'''</span>The optional [N] parameter, when passed along with a valid agent name, will retrieve information regarding animation queues for that agent. | <span style="display: inline-block; width: 60px;">'''[N]'''</span>The optional [N] parameter, when passed along with a valid agent name, will retrieve information regarding animation queues for that agent. | ||
− | = Properties = | + | == Properties == |
<span style="display: inline-block; line-height: 40px; width: 80px;">'''active'''</span>Specifies if the agent is the active or topmost Agent window. | <span style="display: inline-block; line-height: 40px; width: 80px;">'''active'''</span>Specifies if the agent is the active or topmost Agent window. | ||
Line 44: | Line 44: | ||
<span style="display: inline-block; line-height: 40px; width: 80px;">'''x,y,w,h'''</span>When any of these properties are specified, the identifier will retrieve the 'left', 'top', 'width', 'height' properties of the Agent, respectively. | <span style="display: inline-block; line-height: 40px; width: 80px;">'''x,y,w,h'''</span>When any of these properties are specified, the identifier will retrieve the 'left', 'top', 'width', 'height' properties of the Agent, respectively. | ||
− | = Example = | + | == Example == |
'''Echo the total number of installed agents to the active window''' | '''Echo the total number of installed agents to the active window''' | ||
<source lang="mIRC">//echo -a $agent(0)</source> | <source lang="mIRC">//echo -a $agent(0)</source> | ||
Line 54: | Line 54: | ||
<source lang="mIRC">//echo -a $agent(myAgent,0).line</source> | <source lang="mIRC">//echo -a $agent(myAgent,0).line</source> | ||
− | = Compatibility = | + | == Compatibility == |
Added: mIRC v5.7 | Added: mIRC v5.7 | ||
Addon On: 02/02/2000 | Addon On: 02/02/2000 | ||
− | = See Also = | + | == See Also == |
* [[/gload command - mIRC|/gload]] | * [[/gload command - mIRC|/gload]] | ||
Revision as of 14:22, 23 June 2014
$agent can be used to return information about your currently installed Microsoft Agent.
Synopsis
$agent(<N|name>,[N])[.property]
Parameters
NThis can be used to retrieve information about the Nth loaded Agent. If this paramter is 0, then mIRC will return the total number of installed agents.
nameWhen using an actual agent name, this parameter can retrieve information about that agent via the optional [.property] feature. If no properties are past, mIRC simply returns the agent name you originally specified.
[N]The optional [N] parameter, when passed along with a valid agent name, will retrieve information regarding animation queues for that agent.
Properties
activeSpecifies if the agent is the active or topmost Agent window.
animWhen coupled with an Agent name, and the optional [N] parameter, this will give you information regarding the animations available to that Agent. If [N] is 1 or higher, this property will return the name of the Nth animation. If [N] is 0, this will return the total number of available animations for this Agent.
balloonGets the current balloon properties for the Agent, which can be: on, off, size, pace, hide.
charWhen coupled with an Nth passed parameter, rather than an Agent name, this property can return the file name for the Nth specified Agent. If N is 0, this property will return the total number of installed Agents.
effectsReturns whether sound effects are on or off.
fnameReturns the filename of the Agent, or default.
hideReturns the auto-hide setting.
idleSpecifies whether idle behavior is on or off for the Agent.
langidReturns the language ID for the system.
lineWhen coupled with an Agent name, and the optional [N] parameter, this property will give you information regarding the queued lines waiting to be spoken by the Agent. If [N] is 1 or higher, this property will return the text in the Nth queued text line. If [N] is 0, this will return the total number of lines waiting to be spoken in the Agent queue.
nameReturns the name you gave to the Agent requested.
ow,ohReturns the original width, or original height of the Agent.
pitchThe current speaking pitch of the specified Agent.
speedThe speed at which the Agent speaks.
visibleReturns either $true or $false if the Agent is visible or not.
x,y,w,hWhen any of these properties are specified, the identifier will retrieve the 'left', 'top', 'width', 'height' properties of the Agent, respectively.
Example
Echo the total number of installed agents to the active window
//echo -a $agent(0)
Echo the agent myAgent current x position to the active window
//echo -a $agent(myAgent).x
Echo the total number of lines in the Agent speaking queue to the active window
//echo -a $agent(myAgent,0).line
Compatibility
Added: mIRC v5.7
Addon On: 02/02/2000