PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Principle
  • The different steps
  • Special case: Sharing an agent between several applications
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Programming an agent
Warning
From version 17, this feature is no longer available.
Principle
A WINDEV application manages an agent via different animation files (in AVI format). Each AVI corresponds to a specific behavior of the agent. Therefore, the following actions are supported for the agents:
  • Pending agent: AVI showing the agent waiting for a specific action. This AVI is played in loop as soon as the agent is displayed. This AVI is stopped as soon as a specific action is requested from the agent.
  • Displaying the agent: AVI played when the agent is displayed for the first time or when the agent is redisplayed.
  • Agent used to propose a user choice: AVI played during the display of a specific message. The user must make a choice among several propositions.
  • Agent used to display a message or a tip: AVI played during the display of an information message for the user.
  • Agent used to ask the user to enter data: AVI played during the display of a specific message. The user must enter an information in a dialog box and validate this input.
Caution: A WINDEV application can support a single agent at a time.
The different steps
The different steps for using an agent from a WINDEV application are as follows:
  1. Initialize the agent (AgentCreate). This initialization is used to define the different AVIs associated with the actions of the agent.
  2. Position the agent in the screen if necessary (AgentMove).
  3. Display the agent (AgentShow).
  4. Manage the different actions of the agent via the following functions:
    Versions 09 and later
    AgentAdvice
    New in version 09
    AgentAdvice
    AgentAdvice
    Displays a message containing a text, an icon and a combination of buttons.
    Versions 09 and later
    AgentBeep
    New in version 09
    AgentBeep
    AgentBeep
    Emits a sound.
    Versions 09 and later
    AgentChoice
    New in version 09
    AgentChoice
    AgentChoice
    Displays a message containing a title, a list of choices, an icon and a combination of buttons.
    Versions 09 and later
    AgentHide
    New in version 09
    AgentHide
    AgentHide
    Hides an agent.
    Versions 09 and later
    AgentInput
    New in version 09
    AgentInput
    AgentInput
    Displays a message containing a title, a text, an icon, a combination of buttons and an input area.
    Versions 09 and later
    AgentMessage
    New in version 09
    AgentMessage
    AgentMessage
    Displays a message containing a title, a text, an icon and a combination of buttons.
  5. At the end of the application, free the memory resources occupied by the agent via AgentTerminate.
Special case: Sharing an agent between several applications
Two WINDEV applications used at the same time can share the same agent. To do so, define the same agent name when initializing the agent with AgentCreate.
In this case, the agent share affects the position and the move of the agent only. The messages displayed by the agent are specific to the current application.
Therefore, if the agent of application 1 occupies the position (100,100), the agent with the same name used in application 2 will occupy the same position. If the application 2 moves the agent, this move will be taken into account by the application 1.
Minimum required version
  • Version 9
Comments
Click [Add] to post a comment