4D v15

OPEN URL (new name for OPEN WEB URL)

Home

 
4D v15
OPEN URL (new name for OPEN WEB URL)

OPEN URL (new name for OPEN WEB URL)  


 

 

OPEN URL ( path {;appName} {; *} )

ParameterTypeDescription
pathString->Path of the document to open or URL
appNameString->Name of application to use
*Operator->If specified = URL is not translated; If omitted = URL is translated

Originally introduced in 4D v14 R3

Compatibility Note: OPEN URL is the new name of the OPEN WEB URL command ("Tools" theme), whose capabilities have been extended.

The OPEN URL command accepts a new appName parameter, allowing you to designate the application to be used to open the document or URL.

If this parameter is specified, the command will ask the system to search for an installed application with the name specified and, if found, will launch it and request it to open the specified URL or document.

On Windows, the mechanism to recognize an application name is the same as the Windows 'Run' menu item in the 'Start' menu. For example:

  • "iexplore" to launch Internet Explorer.
  • "chrome" to launch Chrome (if installed)
  • "winword" to launch MS Word (if installed)

Note: The list of recognized applications can be found in the registry at the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

On OS X, the mechanism uses the Finder database which automatically indexes all installed applications. It recognizes any .app application by its bundle name (with or without the .app suffix). For example:

  • "safari"
  • "FireFox"
  • "TextEdit"

If the appName application is not found, no error is returned; the command works as if it was not specified (i.e., the system selects the most appropriate application for the document type or URL).

Example  

You can open a text file with different applications:

 OPEN URL("C:\\temp\\cookies.txt") //open the file with Notepad
 OPEN URL("C:\\temp\\cookies.txt";"winword") //open the file with MS Word (if installed)
 OPEN URL("C:\\temp\\cookies.txt";"excel") //open the file with MS Excel (if installed)

 
PROPERTIES 

Product: 4D
Theme: Language

 
HISTORY 

 
ARTICLE USAGE

4D v15 - Upgrade (standard edition) ( 4D v15)