PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

  • Using a command line
  • Using the exeActive constant
  • Return value of a WINDEV executable
  • Various
  • Equivalence
  • Operating mode in GO mode and at run time
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 program (an executable for example) from the current application.
Windows Mobile This allows you to retrieve:
  • the return value of executable with the exeReturnValue constant.
  • the process identifier, also called PID with the exePID constant.
Versions 22 and later
Android This function is now available for Android applications.
Android Widget This function is now available in Android Widget mode.
New in version 22
Android This function is now available for Android applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Android Widget This function is now available in Android Widget mode.
Example
Versions 22 and later
AndroidAndroid Widget
// Start Google Maps
ExeRun("com.google.android.apps.maps")
New in version 22
AndroidAndroid Widget
// Start Google Maps
ExeRun("com.google.android.apps.maps")
AndroidAndroid Widget
// Start Google Maps
ExeRun("com.google.android.apps.maps")
Syntax

Running an executable (in locking or non-locking mode) Hide the details

<Result> = ExeRun(<Program name> [, <Mode> [, <Wait for end> [, <Working directory>]]])
<Result>: Boolean
  • True if the program was started,
  • False otherwise. ErrorInfo returns more details about the error.
<Program name>: Character string
Name of program to start with its path and/or the parameters that must be passed to the program (if necessary).
  • If no path is specified, the program is sought in the current directory, then in the Windows directory and in the directories accessible by PATH.
  • If the executable corresponds to a long name with space characters, the following syntax must be used:
    <Program name> = " " " Long_name_with_spaces" " Command_line"
Versions 22 and later
AndroidAndroid Widget Full name of the application to start (with the package name).
Example: to start the Google Maps application, <Program name> corresponds to: "com.google.android.apps.maps"
New in version 22
AndroidAndroid Widget Full name of the application to start (with the package name).
Example: to start the Google Maps application, <Program name> corresponds to: "com.google.android.apps.maps"
AndroidAndroid Widget Full name of the application to start (with the package name).
Example: to start the Google Maps application, <Program name> corresponds to: "com.google.android.apps.maps"
<Mode>: Optional integer constant
Mode used to start the program (no action on the DOS programs).
exeActive
(Default value)
The program run is active, it "takes control" over the current program.
exeIconizeThe program run is inactive and it is minimized.
AndroidAndroid Widget Windows Mobile This constant is not available.
exeInactiveThe program run is inactive: it is run while the current program keeps focus.
AndroidAndroid Widget This constant is not available.
exeMaximizeThe program run is active, it "takes control" over the current program (the execution window is maximized).
AndroidAndroid Widget This constant is not available.
AndroidAndroid Widget The program run is always active: it is run by "taking control" over the current program.
<Wait for end>: Optional Boolean constant
Configures the time-out before resuming the execution of the current program:
exeWaitThe current program resumes its execution when the program run is over.
AndroidAndroid Widget The application can be started in non-locking mode only. A fatal error occurs if the exeWait constant is used.
exeDontWait
(Default value)
The current program and the program run are run in parallel.
<Working directory>: Optional character string
Working directory of application to start.
AndroidAndroid Widget This parameter is not available.
Windows Mobile

Starting a program and retrieving a value Hide the details

<Result> = ExeRun(<Program name> [, <Mode> [, <Element to return> [, <Working directory>]]])
<Result>: Integer
Sought value:
  • Return value of the executable if <Element to return> corresponds to the exeReturnValue constant.
  • PID of the executable if <Element to return> corresponds to the exePID constant.
ErrorInfo is used to find out whether an error occurred.
<Program name>: Character string
Name of program to start with its path and/or the parameters that must be passed to the program (if necessary).
  • If no path is specified, the program is sought in the current directory, then in the Windows directory and in the directories accessible by PATH.
  • If the executable corresponds to a long name with space characters, the following syntax must be used:
    <Program name> = " " " Long_name_with_spaces" " Command_line"
<Mode>: Optional integer constant
Mode used to start the program (no action on the DOS programs).
exeActive
(Default value)
The program run is active, it "takes control" over the current program
exeIconizeThe program run is inactive and it is minimized
Windows Mobile This constant is not available.
exeInactiveThe program run is inactive: it is run while the current program keeps focus
exeMaximizeThe program run is active, it "takes control" over the current program (the execution window is maximized)
<Element to return>: Optional constant
Configures the function result:
exeReturnValueThe current program resumes its execution when the program run is over. <Result> corresponds to the return value of executable.
exePIDThe current program and the program run are run in parallel. <Result> corresponds to the identifier of created process (also called PID) if the executable was successfully run, 0 if an error occurred.
This identifier can be used in some APIs for example.
<Working directory>: Optional character string
Working directory of application to start.
Remarks

Using a command line

To pass parameters in command line to the executable run, you must specify the name and full path of the executable to run.
If the program run was developed with WINDEV, CommandLine allows you to retrieve the command line.
Windows Mobile

Using the exeActive constant

If the process where the application is run (with the exeActive constant) runs a code allowing the calling program to regain focus, the called program loses control.
In order for the called program to keep focus, you must not:
  • call another window or dialog box after the call to ExeRun,
  • call ReturnToCapture after ExeRun.
In addition, the Button control (if there is one) whose associated "Click" event contains a call to ExeRun must not be "Tab Stop" ("Accessible by TAB" in the "GUI" tab of the control description).
Windows Mobile

Return value of a WINDEV executable

A WINDEV executable can return a value. To do so:
  1. Create an Integer variable global to the project.
  2. Initialize this variable with the value to return.
  3. Return this variable with the keyword RESULT in the project closing code.
Windows Mobile

Various

  • ExeRun does not modify the current directory. The current directory before running ExeRun is identical to the current directory after running ExeRun.
  • If the program run ignores the specified runtime mode, the program is run in exeActive mode.
Windows Mobile

Equivalence

The operating mode of ExeRun is equivalent to the operating mode of ceRunExe.
The only difference is:
  • ceRunExe runs a program on the Pocket PC from a WINDEV application.
  • ExeRun runs a program on the Pocket PC from a WINDEV Mobile application.
Windows Mobile

Operating mode in GO mode and at run time

In GO mode (simulation on the development computer), the application to start must be found on the development computer.
At run time, the application to start must be found on the Pocket PC.
The differences between GO mode (simulator) and real use are presented in Differences between GO mode and real use.
Component : wd250std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment