[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'Intuition' (#aros)


Automatically build and get response from a requester.


Source position: intuition.pas line 3245

function AutoRequest(

  Window: PWindow;

  Body: PIntuiText;

  PosText: PIntuiText;

  NegText: PIntuiText;

  PFlag: LongWord;

  NFlag: LongWord;

  Width: LongWord;

  Height: LongWord





A pointer to a Window structure. See BuildSysRequest() for a full discussion.



A pointer to an TIntuiText structure



A pointer to an TIntuiText structure, may by nil.



A pointer to an TIntuiText structure, must be valid!



Flags for the IDCMP



Flags for the IDCMP



The width to be used for the rendering of the requester



The height to be used for the rendering of the requester

Function result

The return value is either True or False. See the text above for a complete description of the chain of events that might lead to either of these values being returned.


This procedure automatically builds a requester for you and then waits for a response from the user, or for the system to satisfy your request. If the response is positive, this procedure returns TRUE. If the response is negative, this procedure returns FALSE.

An IDCMPFlag specification is created by bitwise "or'ing" your PosFlags, NegFlags, and the IDCMP classes IDCMP_GADGETUP and IDCMP_RAWKEY. You may specify zero flags for either the PosFlags or NegFlags arguments.

The IntuiText arguments, and the width and height values, are passed directly to the BuildSysRequest() procedure along with your window pointer and the IDCMP flags. Please refer to BuildSysRequest() for a description of the IntuiText that you are expected to supply when calling this routine. It's an important but long-winded description that need not be duplicated here.

If the BuildSysRequest() procedure does not return a pointer to a window, it will return TRUE or FALSE (not valid structure pointers) instead, and these BOOL values will be returned to you immediately.

On the other hand, if a valid window pointer is returned, that window will have had its IDCMP ports and flags initialized according to your specifications. AutoRequest() then waits for IDCMP messages on the UserPort, which satisfies one of four requirements:

When the dust has settled, this routine calls FreeSysRequest() if necessary to clean up the requester and any other allocated memory.

When DOS brings up AutoRequests() on your process (eg. "Please insert volume XXX in any drive", they normally come up on the Workbench screen. If you set your Process pr_WindowPtr field to point to one of your windows, then DOS will bring its requesters up on the same screen as that window. A pr_WindowPtr of -1 prevents requesters from coming up at all. (Some FileSystem requesters cannot be redirected or supressed).

See also



Easy alternative to AutoRequest()



Build and display a system requester.



Handle system requester input.

Documentation generated on: 2017-01-10