![]() |
|||
| Version www.capesoft.com Updated 25 February 2003 |
|||
|
Available Functions
|
|||
| ds_SetAgentOptions [Updated in Version 1.39] | |||
| ds_DisablePopupOptions [New in Version 1.37] | |||
| ds_AgentDoGesture [New in Version 1.31] | |||
| ds_GetAgentStatus [New in Version 1.31] | |||
| ds_GetAvailableAgents | |||
| ds_MsALanguage | |||
| ds_GetSetLanguage | |||
| ds_ChangeAgentVoice | |||
| ds_StopSequence | |||
| ds_MsAErrorCheck | |||
| ds_GetLearning | |||
| Ds_GetRunCheck | |||
| Ds_ImmediateAgent | |||
| Ds_ImmediateGenie | |||
| ds_AgentInterface | |||
| ds_CheckFunction | |||
| ds_SetMousePos | |||
| ds_AgentWait | |||
| ds_RecieveItemMap | |||
| ds_MsAFileNames [Important Changes in Version 1.35] | |||
| ds_SendPosition | |||
| Functions not Available for General Use | |||
| ProgramName: | The name of the current application (the template variable %Application should be used) |
| PaceBalloonText: | Set to pace the balloon text with the speech, cleared to show all the text immediately. |
| CloseBalloon: | Set to close the balloon when the agent has finished speaking the text in the speach bubble. |
| AllowIdling: | Set to allow idle mode on |
| Other Features: | Bit0: Set to show the speech balloon, and cleared to hide the balloon. |
| Options : | Bit0 - if set will make the defaults program specific, rather
than using the general settings. Bit1 - if set will override the existing values found in the IniFile. |
| IniFile: | the name of the Ini file to store the settings (if omitted, it defaults to 'msa.ini'). |
| NoChangeVoice: | Disable/enable the Change Voice item in the popup menu. |
| NoAgentSettings: | Disable/enable the Agent Settings sub menu in the agent's popup menu. |
| DoGesture: | The gesture that the agent must perform. If this is not a valid gesture for this agent, then the agent will not perform the gesture. |
| AgentNow: | Optional parameter. This allows you to specify the agent to use, if there are no agents open. |
| ReturnGroup | group,pre(RG) | |
| UseThisAgent | string(20) | !The Agent's name that is currently open. Clear if no Agent is open. |
| AgentBusy | long | !Set if the Agent is currently performing and action (Say/Move/Gesture/Open/Close). Clear if the Agent is idle. |
| AgentThread | long | !The Thread of the window that controls the Agent. Clear if there is no agent open. |
| ExtraLong | long | !Reserved |
| ExtraStr | string(40) | !Reserved |
| end |
| TestAgent: | Indicate a character name to test if this Agent is loaded |
| Options: | bit0 (LSB) if set indicates that the agents in the file but
not loaded should be preceded with a '~' in the | delimited string. bit1 if set indicates that the function should display a popup menu of the | delimited string and return the name of the agent selected. |
| ExtraS: | Reserved for later use |
| Lang: | The translation file to use for translating the Special Agent windows and messages. |
| Options: | bit0 if set, then get the language setting in the translation file, and if existant, then set the Sequence Selection Limiter to this language (this language must be matched precisely in the Special Agent languages file in order to be able to do this). |
| SetLanguageNo: | set the Sequence Selection Limiter directly. If a 0 is passed, then the Sequence Selection Limiter will be cleared and all sequences will be displayed in the 'How do I?' menu and sequence popup menu. |
| SetLanguage: | if SetLanguageNo is omitted then the Sequence Selection Limiter will be set by the SetLanguage string. This language must be matched precisely in the Special Agent languages file in order to be able to do this. |
| Options: | reserved for later use. |
| AgentName: | The name of the Agent whose voice must be set. |
| AgentNo: | The reference number for the agent (in the Special Agent Characters
file) whose voice must be set (if AgentName omitted). If both parameters are omitted then the current agent's settings will be used |
| Options: | reserved for later use. |
| Lfile: | The default translation file to use. Can be changed with the ds_MsALanguage function. |
| Lpath: | The translation file path (where all the translation files are stored). This is not reset in the ds_MsALanguage function. |
| Options: | bit0: (LSB) set to enable all translatings. bit1: set to check all Special Agent messages are in the translation file. Will do the checking the next time the function ds_CheckFunction is called (tempate use only). |
| Options: | A bit loaded flag: bit0 - Stop Immediately (agent and sequence) |
| Agent: | the first string passed is used to determine which agent should be used to perform the function. |
| Sentence: | a string containing a valid sentence, which will be issued for the agent to speak. Note: There should be no illegal speak characters. See the Agent docs under Learning A Sequence. |
| Sentence: | a string containing a valid sentence, which will be issued for the agent to speak. Note: There should be no illegal speak characters. See the Agent docs under Learning A Sequence. |
| Controls: | This is basically used to tell the procedure what you want it to do. If this is a 0 then the Sequence Window will appear (like with the Ctrl-F12 hot key). For all other values the Sequence Window will not appear. If this is a 1 then and there is no SeqName, then a popup menu will appear at the position of the mouse giving a list of the sequences to run. If the value is <AgenttoWhere> (which is defined in the template) then a Select window will appear containing all the sequences that pertain to the App1 and the Proc1 that are passed as parameters (or the current Application and Procedure if they are omitted). For any other value, the sequence with that ID (or index) will be run. |
| Proc1: | <optional> This indicates the current procedure and will indicate which sequences can be run (dependent on Controls). |
| App1: | <optional> This indicates the current application and will indicate which sequences can be run (dependent on Controls). |
| Options: | Bit 1 indicates whether this procedure is a frame (set) or not (not set). This is important as it is used to set the reference co-ordinates of the program (if the procedure is the frame). |
| SeqName: | <optional> This indicates the sequence to be run by the sequence name. Controls need to be set to 1. |
| Agent: | This is the ProgID of the Agent. (Typically 'Agent.Control.2') |
| Pic: | This is the description of the Agent. (Typically 'Genie'). From Version 1.16 this is not required (from the DLL point of view) but is retained for backward compatiblilty. |
| Option: | not used at this stage. |
| X: | The x position to move the mouse/ agent to. |
| Y: | The y position to move the mouse/ agent to. |
| F: | A flag to set whether the mouse moves relative to its previous position (1) or relative to the top left corner of the window focus (0). If the flag is set to 64 then the move pertains to the Agent and not the mouse. |
| Flag: | Determines whether to set or clear the DLL's global wait flag. Set halts the sequence and clear allows it to continue. |
| App: | Reserved for future use. |
| Proc: | Reserved for future use. |
| Option: | Reserved for future use. |
| MapK: | A string containing the key strokes to press to get to the required menu item. The first letter is the hot key to press to drop the first menu down. The DLL will immediately press the ESCKey so that the first menu does not appear. If the first item/menu on the menubar is an item then when the item is required, no directs will follow (except the E). R = Right Key, D = Down Key, E = EnterKey.It must end in E and have only one E in the string. |
| D1: | A long indicating the delay between right and down keys (This defaults to 30 msec if omitted). |
| D2: | A long indicating delay between getting to item and pressing the enter key (This defaults to 70 msec if omitted). |
| Opt: | A long reserved for later use. |
| Extra: | A string reserved for later use. |
| FN: | The file name (including the path if required to be fixed) of the file containing the sequences. If omitted, this defaults to 'Agent.csa'. |
| CFN: | The filename used for the characters and gestures tables. |
| Options: | A bit loaded long with the following parameters: |
| Bit0 | Don't display error messages |
| Bit1 | Use Agent.tps for Characters file. |
| Bit2 | Don't display warnings when agents/OCX not loaded |
| Bit3 | Clear FileNames, so Special Agent is Disabled |
| Bits4-8 | Reserved for later use |
| Bytes1-4 | Template Version indicator. Convert the top 4 bytes to hex, shift 3 bytes and divide by 100. So Version 1.35 would be passed as: 013500xH, where x are the options indicated above. For previous versions (before 1.35), the version was passed in decimal. Thus, the version was indicated by 132000 for version 1.32. This caused problems with the bit loaded options. |
| ProcedureName: | The name attribute of the procedure as used in the template (template variable %Procedure). This same name is used in the making of sequences and must correspond to those names. |
| Options: | A 1 for the frame procedure, else a 0. |
| ds_GetRunParam(),long | |
| ds_GetRunString(string,long),string | |
| ds_GetPosition(),string | |
| ds_GetMenuItem(long,string,string,<long>),string | |
| ds_GetMenuTip(long,<long>),String | |
| ds_GetControlName(),string | |
| ds_ThreadNotify(String,Long,String,<long>),long | |
| ds_AgentControlQ(string,string,long,long,<string>) | |
| ds_AddEvent(string,string,string,long,<long>) | [This function has now been replace with ds_AddEvent1, but is provided for backward compatability] |
| ds_AddEvent1(string,string,<string>,<long>,<long>) | [New function introduced in version 1.16] |