.CLIENT LOAD URL
This subroutine loads a URL, document, runs a command on the user's PC or changes a client setting.
Usage:
PASS <url> FIELD SHARE? N
GOSUB --- .CLIENT LOAD URL
* Check for errors
IF --- .CLIENT LOAD URL NE
Description:
This subroutine loads a URL, document, runs a command on the user's PC or changes a client setting. The <url> parameter is required, if it is missing the subroutine will CANCEL.
<url> is the URL or document to open, or the command to run on the user's PC. It can take several forms:
- http://, https:, ftp://, mailto:, or any other valid web URL
- The name of a file accessible to the user's PC. In this case, the client will rely on the desktop O/S to determine the correct program to use. For Macintosh clients, you will need to set the client desktop preference for commandShell to the program 'open'. For Linux clients, you also need to set commandShell to some program that will examine the file type & call the appropriate program to open it. Note that different desktop O/S'es handle embedded blanks differently. If your file name includes blanks, for most Windows desktops you should enclose the name in quotes, but for most Mac desktops you should NOT enclose it in quotes. Some experimentation may be required.
- A program on the user's PC. For Windows and Linux desktops, prefix the program name with an '@', ie, @notepad or @gedit. You can pass additional arguments after the program name, ie, @notepad somefile.txt. For Macintosh clients, just pass the complete path to the program, ie, /Applications/Chess.app. Remember that file and program names on Linux and Macintosh desktops are case sensitive.
- A network path, such as \\<server_name\<share_name> for Windows desktops, or smb:////<server_name/<share_name> for Linux or Macintosh desktops.
- The constant '$beep:'. This will make the client play a 'beep' sound.
- The constant '$play:' followed by the path and file name of a 'wav' file accessible to the user's PC, ie, $play:/Users/bsmith/Desktop/TestSnd.wav
- The constant $display: followed by the path and file name of any file accessible to the user's PC. The file will display on screen using the default viewer.
- The constant $print: followed by the path and file name of any file accessible to the user's PC. The file will print on the default printer.
- The constant $printSetup: will display the Windows Print Setup dialog box. You could use this to allow the user to select a printer before using the $print: URL.
-
The constant $newsession: followed by the necessary parameters to open a new session. This spawns a new session connected to the same server as the current session. In the parameters section, you can put any client setting. For example, you might have a program that requires a different number of rows and columns. Now you can add a menu item that starts a new session with the correct screen size, e.g., $newsession: -screenRows=28 - screenColumns=110 -runDatabase=DMO - runProcessType=INPUT - runProcess=”ORDER_ENTRY” - runApplication=COE
-
The constant $setprop: followed by {property}={value}. This allows you to change the client properties from ILF code.
Not all properties can be changed while the client is running. To see what can be changed, run the client and connect to a server, then go to File/Preferences. Everything you are allowed to change there can also be changed via this URL. For example, to turn dialog boxes on for errors you would use '$setprop:showErrorDialogs=true'. The change is only for the duration of the session. Another way to change client properties is via the '$newsession:' URL. That URL will let you set any property in a new session.
Also see
.CLIENT PLAY SOUND.
Comments:
Read what other users have said about this page or add your own comments.
--
JeanNeron - 2012-02-01