Difference between revisions of "Documentation/BASIC Guide/Other Functions (Runtime Library)"
(→Wait: add "WaitUntil") |
|||
Line 40: | Line 40: | ||
The third parameter, <tt>Param</tt>, permits command line parameters to be transferred to the program to be started. | The third parameter, <tt>Param</tt>, permits command line parameters to be transferred to the program to be started. | ||
− | == Wait == | + | == Wait and WaitUntil == |
− | The <tt>Wait</tt> | + | The <tt>Wait</tt> statement suspends program execution for a specified time. The waiting period is specified in milliseconds. The command: |
<source lang="oobas"> | <source lang="oobas"> | ||
Line 48: | Line 48: | ||
</source> | </source> | ||
− | specifies | + | specifies a delay of 2 seconds (2000 milliseconds). |
+ | |||
+ | The <tt>WaitUntil</tt> statement provides a greater degree of compatibility with VBA parameter usage. <tt>WaitUntil</tt> takes a parameter of type <tt>Date</tt>, with a combined date and time value. The command: | ||
+ | |||
+ | <source lang="oobas"> | ||
+ | WaitUntil Now + TimeValue("00:00:02") | ||
+ | </source> | ||
+ | |||
+ | specifies the same delay, 2 seconds, as the previous example. | ||
== Environ == | == Environ == |
Revision as of 07:05, 19 February 2009
Beep
The Beep function causes the system to play a sound that can be used to warn the user of an incorrect action. Beep does not have any parameters:
Beep ' creates an informative tone
Shell
External programs can be started using the Shell function.
Shell(Pathname, Windowstyle, Param)
Pathname defines the path of the program to be executed.
Windowstyle defines the window in which the program is started.
The following values are possible:
- 0 - The program receives the focus and is started in a concealed window.
- 1 - The program receives the focus and is started in a normal-sized window.
- 2 - The program receives the focus and is started in a minimized window.
- 3 - The program receives the focus and is started in a maximized window.
- 4 - The program is started in a normal-sized window, without receiving the focus.
- 6 - The program is started in a minimized window, the focus remains in the current window.
- 10 - The program is started in full screen mode.
The third parameter, Param, permits command line parameters to be transferred to the program to be started.
Wait and WaitUntil
The Wait statement suspends program execution for a specified time. The waiting period is specified in milliseconds. The command:
Wait 2000
specifies a delay of 2 seconds (2000 milliseconds).
The WaitUntil statement provides a greater degree of compatibility with VBA parameter usage. WaitUntil takes a parameter of type Date, with a combined date and time value. The command:
WaitUntil Now + TimeValue("00:00:02")
specifies the same delay, 2 seconds, as the previous example.
Environ
The Environ function returns the environmental variables of the operating system. Depending on the system and configuration, various types of data are saved here. The following call determines the environment variables of temporary directory of the operating system:
Dim TempDir TempDir=Environ ("TEMP")
Content on this page is licensed under the Public Documentation License (PDL). |