$agent

From Scriptwiki
Revision as of 17:24, 9 August 2008 by Aca20031 (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

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 $+ ).