From Clomosy Docs
ClomosyAdmin (talk | contribs) No edit summary |
ClomosyAdmin (talk | contribs) No edit summary |
||
| Line 36: | Line 36: | ||
<h2> See Also </h2> | <h2> See Also </h2> | ||
* [[System_Library#Input-Output_Functions | Input Output Functions]] | * [[System_Library#Input-Output_Functions | Input Output Functions]] | ||
{{#seo:|title=InputAndCall Using in Clomosy - Clomosy Docs}} | |||
{{#seo:|description=Explore InputAndCall on Clomosy. Learn how to gather user input and trigger function calls based on the entered data.}} | {{#seo:|description=Explore InputAndCall on Clomosy. Learn how to gather user input and trigger function calls based on the entered data.}} | ||
Latest revision as of 13:31, 24 December 2024
InputAndCall('Caption Value','Default Value','SetInputQueryString','InputExit');
The InputAndCall function is used to perform a data input operation by displaying a message box with a text box for the user to enter data. It provides a simple way to prompt the user for input in a dialog box.
The message box typically contains two buttons, one for confirming the entry and the other for canceling the action. When the user presses the confirmation button (usually labeled "OK"), the entered data is stored in a variable (eg UserValue) and the function returns True. If the user cancels the dialog by pressing the cancel button, the function returns False and all entered data is discarded.
The InputAndCall function takes the title value as the first parameter. The second parameter is used to specify the default text that will be displayed in the input field. The third parameter should define the action to be triggered when the confirmation button is clicked, and similarly, the fourth parameter should specify the action to be triggered when the cancel button is pressed.
Example
var
valueTxt : String;
void SetInputQueryString;
{
valueTxt = Clomosy.GlobalResult;
ShowMessage(valueTxt);
}
void InputExit;
{
Exit;
}
{
InputAndCall('Input a value?','Default Value','SetInputQueryString','InputExit');
}
