Author Topic: Control MicroSoft Agents  (Read 5103 times)

onthecuttingedge2005

  • Guest
Control MicroSoft Agents
« on: October 06, 2007, 11:06:49 am »
here are some functions and properties that can be called to control MS Agents from the AgentCtl.dll file which is open sourced.

I used PE Explorer to give you the below source.

Code: [Select]
//Microsoft Agent Control 2.0
//Version: 2.0
AgentObjects;
GUID = {F5BE8BC2-7DE6-11D0-91FE-00C04FD701A5};


//IAgentCtlCharacters Interface
Dispatch IAgentCtlCharacters;
GUID = {F5BE8BE8-7DE6-11D0-91FE-00C04FD701A5};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out

rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams:

^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT);

stdcall;
  property-get Item(CharacterID: BSTR): ^IAgentCtlCharacterEx; stdcall;
  function Character(CharacterID: BSTR): ^IAgentCtlCharacterEx; stdcall;
  property-get Enum: IUnknown; stdcall;
  function Unload(CharacterID: BSTR); stdcall;
  function Load(CharacterID: BSTR; out LoadKey: Variant): ^IAgentCtlRequest; stdcall;

//IAgentCtlCharacterEx Interface
Dispatch IAgentCtlCharacterEx;
GUID = {DE8EF600-2F82-11D1-ACAC-00C04FD97575};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out

rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams:

^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT);

stdcall;
  property-get Balloon: ^IAgentCtlBalloonEx; stdcall;
  property-get Commands: ^IAgentCtlCommandsEx; stdcall;
  property-get Name: BSTR; stdcall;
  property-get Description: BSTR; stdcall;
  property-get Visible: Bool; stdcall;
  property-put Left(out : I2); stdcall;
  property-get Left: I2; stdcall;
  property-put Top(out : I2); stdcall;
  property-get Top: I2; stdcall;
  property-put Height(out : I2); stdcall;
  property-get Height: I2; stdcall;
  property-put Width(out : I2); stdcall;
  property-get Width: I2; stdcall;
  property-get Speed: I4; stdcall;
  property-get Pitch: I4; stdcall;
  property-put IdleOn(out : Bool); stdcall;
  property-get IdleOn: Bool; stdcall;
  function Activate(out State: Variant): Bool; stdcall;
  function Play(Animation: BSTR): ^IAgentCtlRequest; stdcall;
  function Get(Type: BSTR; Name: BSTR; out Queue: Variant): ^IAgentCtlRequest; stdcall;
  function Stop(out Request: Variant); stdcall;
  function Wait(WaitForRequest: IDispatch): ^IAgentCtlRequest; stdcall;
  function Interrupt(InterruptRequest: IDispatch): ^IAgentCtlRequest; stdcall;
  function Speak(out Text: Variant; out Url: Variant): ^IAgentCtlRequest; stdcall;
  function GestureAt(x: I2; y: I2): ^IAgentCtlRequest; stdcall;
  function MoveTo(x: I2; y: I2; out Speed: Variant): ^IAgentCtlRequest; stdcall;
  function Hide(out Fast: Variant): ^IAgentCtlRequest; stdcall;
  function Show(out Fast: Variant): ^IAgentCtlRequest; stdcall;
  function StopAll(out Types: Variant); stdcall;
  property-get MoveCause: I2; stdcall;
  property-get VisibilityCause: I2; stdcall;
  property-get HasOtherClients: Bool; stdcall;
  property-put SoundEffectsOn(out : Bool); stdcall;
  property-get SoundEffectsOn: Bool; stdcall;
  property-put Name(: BSTR); stdcall;
  property-put Description(: BSTR); stdcall;
  property-get ExtraData: BSTR; stdcall;
  function ShowPopupMenu(x: I2; y: I2): Bool; stdcall;
  property-put AutoPopupMenu(: Bool); stdcall;
  property-get AutoPopupMenu: Bool; stdcall;
  property-put HelpModeOn(: Bool); stdcall;
  property-get HelpModeOn: Bool; stdcall;
  property-put HelpContextID(: I4); stdcall;
  property-get HelpContextID: I4; stdcall;
  property-get Active: I2; stdcall;
  function Listen(Listen: Bool): Bool; stdcall;
  property-put LanguageID(: I4); stdcall;
  property-get LanguageID: I4; stdcall;
  property-get SRModeID: BSTR; stdcall;
  property-put SRModeID(: BSTR); stdcall;
  property-get TTSModeID: BSTR; stdcall;
  property-put TTSModeID(: BSTR); stdcall;
  property-get HelpFile: BSTR; stdcall;
  property-put HelpFile(: BSTR); stdcall;
  property-get GUID: BSTR; stdcall;
  property-get OriginalHeight: I2; stdcall;
  property-get OriginalWidth: I2; stdcall;
  function Think(Text: BSTR): ^IAgentCtlRequest; stdcall;
  property-get Version: BSTR; stdcall;
  property-get AnimationNames: ^IAgentCtlAnimationNames; stdcall;
  property-get SRStatus: I4; stdcall;

//IAgentCtlCharacter Interface
Dispatch IAgentCtlCharacter;
GUID = {F5BE8BD9-7DE6-11D0-91FE-00C04FD701A5};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out

rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams:

^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT);

stdcall;
  property-get Balloon: ^IAgentCtlBalloonEx; stdcall;
  property-get Commands: ^IAgentCtlCommandsEx; stdcall;
  property-get Name: BSTR; stdcall;
  property-get Description: BSTR; stdcall;
  property-get Visible: Bool; stdcall;
  property-put Left(out : I2); stdcall;
  property-get Left: I2; stdcall;
  property-put Top(out : I2); stdcall;
  property-get Top: I2; stdcall;
  property-put Height(out : I2); stdcall;
  property-get Height: I2; stdcall;
  property-put Width(out : I2); stdcall;
  property-get Width: I2; stdcall;
  property-get Speed: I4; stdcall;
  property-get Pitch: I4; stdcall;
  property-put IdleOn(out : Bool); stdcall;
  property-get IdleOn: Bool; stdcall;
  function Activate(out State: Variant): Bool; stdcall;
  function Play(Animation: BSTR): ^IAgentCtlRequest; stdcall;
  function Get(Type: BSTR; Name: BSTR; out Queue: Variant): ^IAgentCtlRequest; stdcall;
  function Stop(out Request: Variant); stdcall;
  function Wait(WaitForRequest: IDispatch): ^IAgentCtlRequest; stdcall;
  function Interrupt(InterruptRequest: IDispatch): ^IAgentCtlRequest; stdcall;
  function Speak(out Text: Variant; out Url: Variant): ^IAgentCtlRequest; stdcall;
  function GestureAt(x: I2; y: I2): ^IAgentCtlRequest; stdcall;
  function MoveTo(x: I2; y: I2; out Speed: Variant): ^IAgentCtlRequest; stdcall;
  function Hide(out Fast: Variant): ^IAgentCtlRequest; stdcall;
  function Show(out Fast: Variant): ^IAgentCtlRequest; stdcall;
  function StopAll(out Types: Variant); stdcall;
  property-get MoveCause: I2; stdcall;
  property-get VisibilityCause: I2; stdcall;
  property-get HasOtherClients: Bool; stdcall;
  property-put SoundEffectsOn(out : Bool); stdcall;
  property-get SoundEffectsOn: Bool; stdcall;
  property-put Name(: BSTR); stdcall;
  property-put Description(: BSTR); stdcall;
  property-get ExtraData: BSTR; stdcall;

//IAgentCtlBalloonEx Interface
Dispatch IAgentCtlBalloonEx;
GUID = {822DB1C0-8879-11D1-9EC6-00C04FD7081F};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out

rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams:

^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT);

stdcall;
  property-get Enabled: Bool; stdcall;
  property-get NumberOfLines: I4; stdcall;
  property-get CharsPerLine: I4; stdcall;
  property-get FontName: BSTR; stdcall;
  property-get FontSize: I4; stdcall;
  property-get FontBold: Bool; stdcall;
  property-get FontItalic: Bool; stdcall;
  property-get FontStrikethru: Bool; stdcall;
  property-get FontUnderline: Bool; stdcall;
  property-get ForeColor: I4; stdcall;
  property-get BackColor: I4; stdcall;
  property-get BorderColor: I4; stdcall;
  property-put Visible(: Bool); stdcall;
  property-get Visible: Bool; stdcall;
  property-put FontName(: BSTR); stdcall;
  property-put FontSize(: I4); stdcall;
  property-put FontCharSet(: I2); stdcall;
  property-get FontCharSet: I2; stdcall;
  property-put Style(: I4); stdcall;
  property-get Style: I4; stdcall;

//IAgentCtlBalloon Interface
Dispatch IAgentCtlBalloon;
GUID = {F5BE8BD3-7DE6-11D0-91FE-00C04FD701A5};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out

rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams:

^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT);

stdcall;
  property-get Enabled: Bool; stdcall;
  property-get NumberOfLines: I4; stdcall;
  property-get CharsPerLine: I4; stdcall;
  property-get FontName: BSTR; stdcall;
  property-get FontSize: I4; stdcall;
  property-get FontBold: Bool; stdcall;
  property-get FontItalic: Bool; stdcall;
  property-get FontStrikethru: Bool; stdcall;
  property-get FontUnderline: Bool; stdcall;
  property-get ForeColor: I4; stdcall;
  property-get BackColor: I4; stdcall;
  property-get BorderColor: I4; stdcall;
  property-put Visible(: Bool); stdcall;
  property-get Visible: Bool; stdcall;
  property-put FontName(: BSTR); stdcall;
  property-put FontSize(: I4); stdcall;
  property-put FontCharSet(: I2); stdcall;
  property-get FontCharSet: I2; stdcall;

//IAgentCtlCommandsEx Interface
Dispatch IAgentCtlCommandsEx;
GUID = {6BA90C01-3910-11D1-ACB3-00C04FD97575};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out

rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams:

^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT);

stdcall;
  property-get Item(Name: BSTR): ^IAgentCtlCommandEx; stdcall;
  function Command(Name: BSTR): ^IAgentCtlCommandEx; stdcall;
  property-get Count: I4; stdcall;
  property-get Caption: BSTR; stdcall;
  property-put Caption(: BSTR); stdcall;
  property-get Voice: BSTR; stdcall;
  property-put Voice(: BSTR); stdcall;
  property-get Visible: Bool; stdcall;
  property-put Visible(: Bool); stdcall;
  property-get Enum: IUnknown; stdcall;
  function Add(Name: BSTR; out Caption: Variant; out Voice: Variant; out Enabled: Variant;

out Visible: Variant): ^IAgentCtlCommand; stdcall;
  function Insert(Name: BSTR; RefName: BSTR; out Before: Variant; out Caption: Variant; out

Voice: Variant; out Enabled: Variant; out Visible: Variant): ^IAgentCtlCommand; stdcall;
  function Remove(Name: BSTR); stdcall;
  function RemoveAll; stdcall;
  property-put DefaultCommand(: BSTR); stdcall;
  property-get DefaultCommand: BSTR; stdcall;
  property-put HelpContextID(: I4); stdcall;
  property-get HelpContextID: I4; stdcall;
  property-put FontName(: BSTR); stdcall;
  property-get FontName: BSTR; stdcall;
  property-get FontSize: I4; stdcall;
  property-put FontSize(: I4); stdcall;
  property-put VoiceCaption(: BSTR); stdcall;
  property-get VoiceCaption: BSTR; stdcall;
  property-put GlobalVoiceCommandsEnabled(: Bool); stdcall;
  property-get GlobalVoiceCommandsEnabled: Bool; stdcall;

//IAgentCtlCommands Interface
Dispatch IAgentCtlCommands;
GUID = {F5BE8BE1-7DE6-11D0-91FE-00C04FD701A5};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out

rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams:

^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT);

stdcall;
  property-get Item(Name: BSTR): ^IAgentCtlCommandEx; stdcall;
  function Command(Name: BSTR): ^IAgentCtlCommandEx; stdcall;
  property-get Count: I4; stdcall;
  property-get Caption: BSTR; stdcall;
  property-put Caption(: BSTR); stdcall;
  property-get Voice: BSTR; stdcall;
  property-put Voice(: BSTR); stdcall;
  property-get Visible: Bool; stdcall;
  property-put Visible(: Bool); stdcall;
  property-get Enum: IUnknown; stdcall;
  function Add(Name: BSTR; out Caption: Variant; out Voice: Variant; out Enabled: Variant;

out Visible: Variant): ^IAgentCtlCommand; stdcall;
  function Insert(Name: BSTR; RefName: BSTR; out Before: Variant; out Caption: Variant; out

Voice: Variant; out Enabled: Variant; out Visible: Variant): ^IAgentCtlCommand; stdcall;
  function Remove(Name: BSTR); stdcall;
  function RemoveAll; stdcall;

//IAgentCtlCommandEx Interface
Dispatch IAgentCtlCommandEx;
GUID = {B0913410-3B44-11D1-ACBA-00C04FD97575};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out

rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams:

^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT);

stdcall;
  property-get Voice: BSTR; stdcall;
  property-put Voice(: BSTR); stdcall;
  property-get Caption: BSTR; stdcall;
  property-put Caption(: BSTR); stdcall;
  property-get Enabled: Bool; stdcall;
  property-put Enabled(: Bool); stdcall;
  property-get Visible: Bool; stdcall;
  property-put Visible(: Bool); stdcall;
  property-get Confidence: I4; stdcall;
  property-put Confidence(: I4); stdcall;
  property-get ConfidenceText: BSTR; stdcall;
  property-put ConfidenceText(: BSTR); stdcall;
  property-put HelpContextID(: I4); stdcall;
  property-get HelpContextID: I4; stdcall;
  property-put VoiceCaption(: BSTR); stdcall;
  property-get VoiceCaption: BSTR; stdcall;

//IAgentCtlCommand Interface
Dispatch IAgentCtlCommand;
GUID = {F5BE8BE3-7DE6-11D0-91FE-00C04FD701A5};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out

rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams:

^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT);

stdcall;
  property-get Voice: BSTR; stdcall;
  property-put Voice(: BSTR); stdcall;
  property-get Caption: BSTR; stdcall;
  property-put Caption(: BSTR); stdcall;
  property-get Enabled: Bool; stdcall;
  property-put Enabled(: Bool); stdcall;
  property-get Visible: Bool; stdcall;
  property-put Visible(: Bool); stdcall;
  property-get Confidence: I4; stdcall;
  property-put Confidence(: I4); stdcall;
  property-get ConfidenceText: BSTR; stdcall;
  property-put ConfidenceText(: BSTR); stdcall;

//IAgentCtlRequest Interface
Dispatch IAgentCtlRequest;
GUID = {1DAB85C3-803A-11D0-AC63-00C04FD97575};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out

rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams:

^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT);

stdcall;
  property-get ID: I4; stdcall;
  property-get Status: I4; stdcall;
  property-get Description: BSTR; stdcall;
  property-get Number: I4; stdcall;

//IAgentCtlCharacterAnimations Interface
Dispatch IAgentCtlAnimationNames;
GUID = {8B77181C-D3EF-11D1-8500-00C04FA34A14};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out

rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams:

^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT);

stdcall;
  property-get Enum: IUnknown; stdcall;

//IAgentCtlAudioObject Interface
Dispatch IAgentCtlAudioObject;
GUID = {F5BE8BDB-7DE6-11D0-91FE-00C04FD701A5};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out

rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams:

^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT);

stdcall;
  property-get Enabled: Bool; stdcall;
  property-get SoundEffects: Bool; stdcall;

//IAgentCtlAudioObjectEx Interface
Dispatch IAgentCtlAudioObjectEx;
GUID = {F5BE8BF0-7DE6-11D0-91FE-00C04FD701A5};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out

rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams:

^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT);

stdcall;
  property-get Enabled: Bool; stdcall;
  property-get SoundEffects: Bool; stdcall;
  property-get Status: I2; stdcall;

//IAgentCtlSpeechInput Interface
Dispatch IAgentCtlSpeechInput;
GUID = {F5BE8BDD-7DE6-11D0-91FE-00C04FD701A5};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out

rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams:

^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT);

stdcall;
  property-get Enabled: Bool; stdcall;
  property-get Language: BSTR; stdcall;
  property-get HotKey: BSTR; stdcall;
  property-get Installed: Bool; stdcall;
  property-get Engine: BSTR; stdcall;
  property-put Engine(: BSTR); stdcall;
  property-get ListeningTip: Bool; stdcall;

//IAgentCtlPropertySheet Interface
Dispatch IAgentCtlPropertySheet;
GUID = {F5BE8BDF-7DE6-11D0-91FE-00C04FD701A5};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out

rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams:

^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT);

stdcall;
  property-get Left: I2; stdcall;
  property-get Top: I2; stdcall;
  property-get Height: I2; stdcall;
  property-get Width: I2; stdcall;
  property-put Visible(: Bool); stdcall;
  property-get Visible: Bool; stdcall;
  property-put Page(: BSTR); stdcall;
  property-get Page: BSTR; stdcall;

Dispatch IAgentCtlUserInput;
GUID = {C4ABF875-8100-11D0-AC63-00C04FD97575};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out

rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams:

^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT);

stdcall;
  property-get Count: I2; stdcall;
  property-get Name: BSTR; stdcall;
  property-get CharacterID: BSTR; stdcall;
  property-get Confidence: I4; stdcall;
  property-get Voice: BSTR; stdcall;
  property-get Alt1Name: BSTR; stdcall;
  property-get Alt1Confidence: I4; stdcall;
  property-get Alt1Voice: BSTR; stdcall;
  property-get Alt2Name: BSTR; stdcall;
  property-get Alt2Confidence: I4; stdcall;
  property-get Alt2Voice: BSTR; stdcall;

//IAgentCtlCommandsWindow Interface
Dispatch IAgentCtlCommandsWindow;
GUID = {6D0ECB27-9968-11D0-AC6E-00C04FD97575};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out

rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams:

^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT);

stdcall;
  property-get Visible: Bool; stdcall;
  property-put Visible(: Bool); stdcall;
  property-get Left: I2; stdcall;
  property-get Top: I2; stdcall;
  property-get Height: I2; stdcall;
  property-get Width: I2; stdcall;

//IAgentCtl Interface
Dispatch IAgentCtl;
GUID = {F5BE8BD1-7DE6-11D0-91FE-00C04FD701A5};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out

rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams:

^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT);

stdcall;
  property-get Characters: ^IAgentCtlCharacters; stdcall;
  property-get AudioOutput: ^IAgentCtlAudioObjectEx; stdcall;
  property-get SpeechInput: ^IAgentCtlSpeechInput; stdcall;
  property-get PropertySheet: ^IAgentCtlPropertySheet; stdcall;
  property-get CommandsWindow: ^IAgentCtlCommandsWindow; stdcall;
  property-get Connected: Bool; stdcall;
  property-put Connected(: Bool); stdcall;
  property-get Suspended: Bool; stdcall;

//IAgentCtlEx Interface
Dispatch IAgentCtlEx;
GUID = {8563FF20-8ECC-11D1-B9B4-00C04FD97575};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out

rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams:

^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT);

stdcall;
  property-get Characters: ^IAgentCtlCharacters; stdcall;
  property-get AudioOutput: ^IAgentCtlAudioObjectEx; stdcall;
  property-get SpeechInput: ^IAgentCtlSpeechInput; stdcall;
  property-get PropertySheet: ^IAgentCtlPropertySheet; stdcall;
  property-get CommandsWindow: ^IAgentCtlCommandsWindow; stdcall;
  property-get Connected: Bool; stdcall;
  property-put Connected(: Bool); stdcall;
  property-get Suspended: Bool; stdcall;
  function ShowDefaultCharacterProperties(out x: Variant; out y: Variant); stdcall;
  property-get RaiseRequestErrors: Bool; stdcall;
  property-put RaiseRequestErrors(: Bool); stdcall;

//IAgentCtl event interface
Dispatch _AgentEvents;
GUID = {F5BE8BD4-7DE6-11D0-91FE-00C04FD701A5};
  function ActivateInput(out CharacterID: BSTR); stdcall;
  function DeactivateInput(out CharacterID: BSTR); stdcall;
  function Click(CharacterID: BSTR; Button: I2; Shift: I2; x: I2; y: I2); stdcall;
  function DblClick(CharacterID: BSTR; Button: I2; Shift: I2; x: I2; y: I2); stdcall;
  function DragStart(CharacterID: BSTR; Button: I2; Shift: I2; x: I2; y: I2); stdcall;
  function DragComplete(CharacterID: BSTR; Button: I2; Shift: I2; x: I2; y: I2); stdcall;
  function Show(CharacterID: BSTR; Cause: I2); stdcall;
  function Hide(CharacterID: BSTR; Cause: I2); stdcall;
  function RequestStart(Request: IDispatch); stdcall;
  function RequestComplete(Request: IDispatch); stdcall;
  function Restart; stdcall;
  function Shutdown; stdcall;
  function Bookmark(BookmarkID: I4); stdcall;
  function Command(UserInput: IDispatch); stdcall;
  function IdleStart(CharacterID: BSTR); stdcall;
  function IdleComplete(CharacterID: BSTR); stdcall;
  function Move(CharacterID: BSTR; x: I2; y: I2; Cause: I2); stdcall;
  function Size(CharacterID: BSTR; Width: I2; Height: I2); stdcall;
  function BalloonShow(CharacterID: BSTR); stdcall;
  function BalloonHide(CharacterID: BSTR); stdcall;
  function HelpComplete(CharacterID: BSTR; Name: BSTR; Cause: I2); stdcall;
  function ListenStart(CharacterID: BSTR); stdcall;
  function ListenComplete(CharacterID: BSTR; Cause: I2); stdcall;
  function DefaultCharacterChange(out GUID: BSTR); stdcall;
  function AgentPropertyChange; stdcall;
  function ActiveClientChange(CharacterID: BSTR; Active: Bool); stdcall;

//Microsoft Agent Control 2.0
CoClass Agent;
GUID = {D45FD31B-5C6E-11D1-9EC1-00C04FD7081F};


Jerry[8D]
« Last Edit: October 06, 2007, 11:30:11 am by onthecuttingedge2005 »

onthecuttingedge2005

  • Guest
Control MicroSoft Agents
« Reply #1 on: October 06, 2007, 11:09:11 am »
Here is an example of what can be done using Vbscript and the above functions and properties used below.

this code is directed to the MSAgent folder for 'Windows Vista', if you use another operating system then you will have to change the directory string below to the correct path that your Agent files are located or this code will not function properly.

Code: [Select]
Dim AgentControl

On Error Resume Next

Set AgentControl = CreateObject("Agent.Control.1")

If IsObject(AgentControl) Then 'it loaded ok
 
AgentControl.Connected = True
 
Dim merlin
 
On Error Resume Next

'C:Windows\MSAgent\chars

AgentControl.Characters.Load "merlin", "C:\Windows\MSAgent\chars\merlin.acs"
 
set merlin = AgentControl.Characters ("merlin")

merlin.Get "state", "Showing"

merlin.Get "state", "Speaking"

merlin.MoveTo 10, 10

merlin.Show

merlin.Get "state", "Moving"

merlin.MoveTo 257, 177

merlin.Speak ("Isn't it about time you started doing some real work?")

merlin.Hide

End If

wscript.echo "What do you think?"

Jerry[8D]
« Last Edit: October 06, 2007, 11:14:22 am by onthecuttingedge2005 »

onthecuttingedge2005

  • Guest
Control MicroSoft Agents
« Reply #2 on: October 06, 2007, 11:25:15 am »
you can run the above code by copying and pasting the code into notepad and saving it as Merlin.vbs and double clicking on the file to run it.

Have fun.
Jerry[8D]

spydaz

  • Hero Member
  • *****
  • Posts: 670
    • View Profile
    • http://www.spydazweb.co.uk/
Control MicroSoft Agents
« Reply #3 on: November 26, 2007, 12:08:17 pm »
All Those propertys and functions :

Question: Does all that "jargon" need to be added to the script or are they just the propertys and Functions available?

IS

Dim merlin
Dim AgentControl

On Error Resume Next

'SET UP CONTROL
Set AgentControl = CreateObject("Agent.Control.1")
If IsObject(AgentControl) Then 'it loaded ok
AgentControl.Connected = True

'SET UP CHARACTER
AgentControl.Characters.Load "merlin",
set merlin = AgentControl.Characters ("merlin")

'Load
merlin.Show

merilin.speak(RESPONSE)
'Hide
merlin.Show


 All you need to load the character... Then control with the MERLIN "variable"....

If so; Does this also mean that in the Hal5 / 6 We could essentially load two characters onscreen at the same time.. The one chosen in the Options.. And the one called up by the script that weve planted "MERLIN"

To answer bill we would be able to use the merlin to scroll hals thoughts, or as like a mini angel / devil on hals shoulder as in TOM&JERRY.. as long as we choose a haptek character as our base character.....

to load two agents would we need to delcare Two connections to the agent control and two character variables....


spydaz

  • Hero Member
  • *****
  • Posts: 670
    • View Profile
    • http://www.spydazweb.co.uk/
Control MicroSoft Agents
« Reply #4 on: November 26, 2007, 12:11:17 pm »
ps: would it be able to be done with two added haptek controls..

as long as you have haptek installed you have access to the same
flexablity..... then all the video that the guys have been making can now all be made in HAL, hal has guests over into his window...
can haptek controls show Two characters at the same time? or would the interface need to be adjusted?
Hmmm...