PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Running the process of a control or procedure belonging to a window (or to a page) other than the current window (or page)
  • String passed in parameter to Execute
  • The arrays
  • Opening process of window/page
  • Calling a global component procedure
  • Using specific functions
  • Running the process of a control
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
Starts the execution of a process by programming. This function is mainly used to run procedures.
For backward compatibility, the process run can also be the process of a control, window or page. In these different cases, we recommend that you use ExecuteProcess.
WEBDEV - Server code The process run corresponds to a server process.
WEBDEV - Browser code The process run corresponds to a browser process.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Run a procedure
Execute("Proced1")
// -- Click on BTN_BUTTON1 button
// Run a procedure that returns a result
Info(Execute("Double_Number", 2)) // Displays 4
// Double_Number procedure
PROCÉDURE Double_Number(X)
RESULT 2*X
Syntax
WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadApple WatchWindows MobileUniversal Windows 10 AppPHPAjaxUser code (UMC)

Running a procedure that may return a result Hide the details

<Result> = Execute(<Procedure Name> [, <Parameter 1>, ..., <Parameter N>])
<Result>: Any
Return value of procedure called. This value is identical to the value obtained if the procedure is run directly.
<Procedure Name>: Character string (with quotes)
Name of WLanguage procedure to run. This procedure returns a result.
<Parameter 1>: Any type
First optional parameter that will be passed to the procedure. These parameters are always passed by value.
<Parameter N>: Any type
Nth optional parameter that will be passed to the procedure. These parameters are always passed by value.

Running the process of a control (syntax kept for backward compatibility) Hide the details

Execute(<Control Name> , <Process>)
<Control Name>: Character string (without quotes)
Name of control associated with the process to run.
<Process>: Character string (without quotes)
Process to run:
ClickClick code of control (or menu option)
ExitExit code of control
WEBDEV - Browser codePHP This constant is not available.
EntryEntry code of control
WEBDEV - Browser codePHP This constant is not available.
InitializationInitialization code of control
WEBDEV - Browser code This constant is not available.
PreviousCode used to read the previous record (browsing table in programmed browse only)
WEBDEV - Server code Code used to read the previous record (browsing table only).

WEBDEV - Browser codePHP This constant is not available.
NextCode used to read the next record (browsing table in programmed browse only)
WEBDEV - Server code Code used to read the next record (browsing table only).

WEBDEV - Browser codePHP This constant is not available.
DisplayCode used to display a row (table only)
WEBDEV - Browser codePHP This constant is not available.
RExitCode used to exit from a table row
WEBDEV - Browser codePHP This constant is not available.
REntryCode used to enter in a table row
WEBDEV - Browser codePHP This constant is not available.
ENDCode used to read the last record (table only)
WEBDEV - Browser codePHP This constant is not available.
ModifyWhenever Modified code of control
WEBDEV - Browser codePHP This constant is not available.
DBLCode for double-clicking a treeview element
WEBDEV - Server code Double-click (OnDblClick)
WEBDEV - Browser codePHP This constant is not available.
CLDCode for right-clicking a treeview element
WEBDEV - Server codeWEBDEV - Browser codePHP This constant is not available.
CLIClick (OnClick) (browser code)
WINDEVWEBDEV - Server codeWINDEV Mobile This constant is not available.
KDNKey down (OnKeyDown) (browser code)
WINDEVWEBDEV - Server codeWINDEV Mobile This constant is not available.
KPRKey pressed and released (OnKeyPressed) (browser code)
WINDEVWEBDEV - Server codeWINDEV Mobile This constant is not available.
KUPKey up (OnKeyUp) (browser code)
WINDEVWEBDEV - Server codeWINDEV Mobile This constant is not available.
MDNMouse button down (OnMouseDown) (browser code)
WINDEVWEBDEV - Server codeWINDEV Mobile This constant is not available.
MMVMouse moves over the control (OnMouseMove) (browser code)
WINDEVWEBDEV - Server codeWINDEV Mobile This constant is not available.
MOUMouse exits from the control (OnMouseOut) (browser code)
WINDEVWEBDEV - Server codeWINDEV Mobile This constant is not available.
MOVMouse enters in the control (OnMouseOver) (browser code)
WINDEVWEBDEV - Server codeWINDEV Mobile This constant is not available.
MUPMouse button up (OnMouseUp) (browser code)
WINDEVWEBDEV - Server codeWINDEV Mobile This constant is not available.
BLULoss of focus (OnBlur) (browser code)
WINDEVWEBDEV - Server codeWINDEV Mobile This constant is not available.
CHGModification (OnChange) (browser code)
WINDEVWEBDEV - Server codeWINDEV Mobile This constant is not available.
FOCGain of focus (OnFocus) (browser code)
WINDEVWEBDEV - Server codeWINDEV Mobile This constant is not available.
SELSelected text (OnSelect) (browser code)
WINDEVWEBDEV - Server codeWINDEV Mobile This constant is not available.
HLPF1 key (OnHelp) (browser code)
WINDEVWEBDEV - Server codeWINDEV Mobile This constant is not available.
WINDEVReports and QueriesiPhone/iPadApple WatchWindows MobileUniversal Windows 10 AppUser code (UMC)

Running the process of a window (syntax kept for backward compatibility) Hide the details

Execute([<Window Name>] , <Type of Process>)
<Window Name>: Optional character string (without quotes)
Name of window whose process must be run. If this name is not specified, the process of current window is run.
<Type of Process>: Character string (without quotes)
Process to run:
INFOpening the window
FEFClosing the window
PRFThe window takes focus
PEFThe window loses focus
MODResizing the window
WEBDEV - Server codeWEBDEV - Browser codePHPAjax

Running the process of a page (syntax kept for backward compatibility) Hide the details

Execute(<Page Name> , <Type of Process>)
<Page Name>: Character string (without quotes)
Name of page whose process must be run. If this name is not specified, the process of the current page is run.
<Type of Process>: Character string (without quotes)
Process to run:
INFOpening the page
FEFClosing the page
PHP This constant is not available.
PRFThe page takes focus
PHP This constant is not available.
PEFThe page loses focus
PHP This constant is not available.
MODResizing the page
PHP This constant is not available.
CLIClick (OnClick)
PHP This constant is not available.
DBLDouble click (OnDblClick)
PHP This constant is not available.
KDNKey down (OnKeyDown)
PHP This constant is not available.
KPRKey pressed and released (OnKeyPressed)
PHP This constant is not available.
KUPKey up (OnKeyUp)
PHP This constant is not available.
MDNMouse button down (OnMouseDown)
PHP This constant is not available.
MMVMouse moves over the control (OnMouseMove)
PHP This constant is not available.
MOUMouse exits from the control (OnMouseOut)
PHP This constant is not available.
MOVMouse enters in the control (OnMouseOver)
PHP This constant is not available.
MUPMouse button up (OnMouseUp)
PHP This constant is not available.
BLULoss of focus (OnBlur)
PHP This constant is not available.
CHGModification (OnChange)
PHP This constant is not available.
FOCGain of focus (OnFocus)
PHP This constant is not available.
SELSelected text (OnSelect)
PHP This constant is not available.
HLPF1 key (OnHelp)
PHP This constant is not available.
LODLoading the page (OnLoad)
PHP This constant is not available.
UNLUnloading the page (OnUnload)
PHP This constant is not available.
RESReinitializing the page (OnReset)
PHP This constant is not available.
SUBValidate the page (OnSubmit)
PHP This constant is not available.
Remarks
WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadApple WatchWindows MobileUniversal Windows 10 AppAjaxUser code (UMC)

Running the process of a control or procedure belonging to a window (or to a page) other than the current window (or page)

You have the ability to run the process of a control or procedure belonging to a window (or to a page) other than the current window (or page). To do so, the control name or the procedure name must be prefixed with the name of the window (or page).
For example:
// Run the process of the Validate button found in MySibling (opened window or page)
Execute("MySibling.Validate..CLI")

// Run the PROC1 procedure of MySibling (opened window or page)
Execute("MySibling.PROC1")
WEBDEV - Browser code You cannot run the process of a control found in a page other than the current page.
WINDEVWEBDEV - Browser codeReports and QueriesiPhone/iPadApple WatchWindows MobileUniversal Windows 10 AppUser code (UMC)

String passed in parameter to Execute

The string passed in parameter to Execute cannot be a built string or a variable. You must use the string that contains the name of control, window or page as well as the process to run.
// Correct code
Execute("Edit2..Exit")

// Incorrect code
i is int = 5
Execute("Edit" + i + "..Exit")
WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadApple WatchWindows MobileUniversal Windows 10 AppAjaxUser code (UMC)

The arrays

The arrays are not recognized by Execute.
For example:
var_arr is array of 10 strings
// Call the MYPROC procedure with an array passed in parameter
MYPROC(var_arr)
// The following statement triggers an error
Execute("MYPROC..PRO", var_arr)
WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadApple WatchWindows MobilePHPAjaxUser code (UMC)

Opening process of window/page

Execute must not be called to run the opening process of a window/page because the global variables may be re-initialized. Procedures must be used in this case.
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileAjaxUser code (UMC)

Calling a global component procedure

Execute is used to call a global component procedure. To do so, use the following syntax:
Execute(<Component Name>.<Name of Set of Procedures>.<Procedure Name>)
Example:
Execute("MyComponent.Set_WDExample.MyProcedure")
In a thread started by a component, Execute cannot be used to call a local procedure of a window of the host project.
You must use a global procedure of the host project to call the local procedure of the window.
WEBDEV - Browser code

Using specific functions

If the call to Execute is preceded by EmailOpenMail and PageSubmit, these functions will be ignored if the code called by Execute contains PageSubmit and EmailOpenMail. Indeed, the browsers allow a single action per page. Only the last requested action will be performed.
WEBDEV - Browser code

Running the process of a control

If <Control Name> corresponds to a button, the execution of the click code will be equivalent to a click performed on the button. If a server code (or an action run on the server) is associated with the button, this code will be run.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
WEBDEV - Browser code WDJS.DLL
Linux wd230vm.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment