$agent
From Scriptwiki
This identifier returns information about a currently loaded Microsoft Agent, but can also be used to return the names of installed agents.
$agent(<N>).char
- Returns the name of the Nth installed agent on your system. If you specify 0, returns the number of agents installed on your system.
$agent(<N|Name>)[.name|.fname|.visible|.x|.y|.w|.h|.ow|.oh|.speed|.pitch|.idle|.effects|.active|.langid|.baloon|.hide]
- You must specify either the name of the agent as it was loaded, or the number of which the agent was loaded. 0 with no property returns the number of loaded agents.
- No property returns the agent name, otherwise:
- .name returns the agent's name as it was loaded
- .fname returns the file name of the agent that it was loaded from ie merlin.acs
- .visible returns whether or not the agent is visible. See ghide and gshow to change this state.
- .x returns the X coordinate of the most upper-left portion of the agent, see gmove to move the agent
- .y returns the Y coordinate of the most upper-left portion of the agent, see gmove to move the agent
- .w and .h return the Width and Height of the agent respectively, see gsize to resize of the agent
- .ow and .oh return the original width and original height of the agent respectively
- .speed returns the speed at which the agent speaks
- .pitch returns the pitch at which the agent speaks
- .idle returns $true or $false based on whether or not the agent has idle effects enabled, see gopts to toggle these effects.
- .active returns whether the agent is "active" (whether it is the top-most agent loaded)
- .langid returns the language ID the agent is using, see gopts to change this
- .balloon returns information about the agent's speach balloon, see gopts to change and see these various balloon settings
- .hide returns whether or not the agent is hidden while mIRC is minimized, see gopts to toggle this. It can also be set by the -h switch in gload
$agent(<N|Name>,<N>)<.anim|.line>
This version of $agent is used to return information about available animations, or the queue for actions to this agent.
- You must specify either the name of the agent as it was loaded, or the number of which the agent was loaded
- N is the Nth item to display, where 0 will return the total number of items.
- .anim specifies the agent's available animations. For example, $agent(1,1).anim will return the first animation for agent 1, which for Merlin is ResetPose
- .line specifies the agent's queue. All commands are queued so they are all executed, unless otherwise set via gqreg.
Examples
echo -a The first loaded agent is $agent(1) ( $+ $agent(1).fname $+ ). echo -a It is currently $iif($agent(1).visible,visible,invisible) at ( $+ $agent(1).x $+ , $+ $agent(1).y $+ ).
echo -a $agent(1).name will do $agent(1,1).line next, and then $agent(1,2).line