ASKUI |
Askui is used to execute a pre-determined action on the client workstation. The list of actions is shown below.
Askui return = "" with action, list_param
|
Element |
Description |
Restrictions |
|
return |
return the information in the form of a string of characters |
|
|
action |
code action : character string in the form : |
|
|
list_param |
List of id_param separated by the character ','. |
The expressions must be alphanumeric and are limited to 255. |
|
id_param |
parameter : character string in the form : |
The expressions must be alphanumeric and are limited to 255. |
# Example 1 : copy an Excel file
# from the client workstation to the TMP folder on the server
# pre-position the current folder in the file selection window
# by the "my documents" folder on the client workstation
Local char RETOUR(250)
Askui RETURN="" With "UIAsk="+chr$(1) + "AskPutFile",
& "UIRemotePath="+ chr$(1) + "TMP",
& "UILocalFileExts="+ chr$(1) + "xls",
& "UILocalPath="+chr$(1) + "#myDocuments"# Example 2 : Create a Word
# pre-position the current folder in the file selection window
# by the "my documents" folder on the client workstation
Local char RETURN (250)
Askui RETURN="" With "UIAsk="+chr$(1) + "AskSelFile",
& "UILocalFileExts="+ chr$(1) + "doc",
& "UILocalPath="+chr$(1) + "#myDocuments"# Example 3 : Read a text file on the client workstation
Local Clbfile RETURN(10)
Setlob RETURN With ""
Askui RETURN With "UIAsk="+chr$(1) + "AskReadTextFile",
& "UILocalFileExts="+ chr$(1) + "txt"# Example 4 : launch a shell command on the client workstation
Local Clbfile RETURN(10)
Setlob RETURN With ""
Askui RETURN With "UIAsk="+chr$(1) + "AskExecShell",
& "UILocalShell="+ chr$(1) + "AdxOfficemodule.hta -cmd xlsinsert -input 'TMP/data.csv'"# Example 5 : copy a file"200406.etebac"
# from the folder BANQ of the current folder to the client workstation
# pre-position the current folder in the file selection window
# by the "my documents" folder on the client workstation
Local char RETURN(250)
Askui RETURN="" With "UIAsk="+chr$(1) + "AskGetFile",
& "UIRemotePath="+ chr$(1) + "BANQ,200406,etebac",
& "UIRemoteBinary="+ chr$(1) + "0",
& "UILocalFileName="+ chr$(1) + "200406.etebac",
& "UILocalPath="+chr$(1) + "#myDocuments"
Askui is used to pilot the client. The client receives (via the engine) the order to execute an Askui. It interprets the associated parameters and it takes charge of the transfer or opening of the file.
Askui is used to launch one of the following actions :
A single action can be specified at a time.
On completion, a code specifies that the action has been correctly carried out or not. In the case of transfer or selection of a file, on completion the name and path for the destination file is returned. In the case of a text file read, on completion a clob with the contents of the text file is returned. In the case of the launch of a shell command, on completion a clob containing the the standard exit of the process (stdout) and the errors (stderr).
This parameter is used to identify the action to be launched on the client.
The available actions are as follows :
|
Action |
Description |
|
AskPutFile |
Transfer a file from the client workstation to the server. |
|
AskGetFile |
Transfer a file from the server to the client workstation, by user request a selection window opens to specify the name of the file to be written on the client workstation as well as the directory. |
|
AskSelFile |
Selection of a file on the client workstation |
|
AskReadTextFile |
Read of a text file on the client workstation. |
|
AskExecShell |
Launch of a Shell command on the client workstation and return of the stdout and stderr in a character string of more than 250 chaaracters. |
The parameters available by action are as follows :
|
Action |
Parameters |
Mand. | |
|
AskPutFile |
UILocalFileName |
Name of the file on the client workstation | |
| UILocalFileExts | Extension(s) to filter the files to be displayed | ||
| UILocalPath | Directory on the client workstation | ||
| UIRemoteFileName | Name of the file on the server | ||
| UIRemotePath | yes | Directory on the server | |
| UIRemoteOverWrite | Flag authorising the re-writing of the file on the server | ||
|
AskGetFile |
UIRemotePathFile |
yes | Directory and Name of the file on the server |
| UIRemoteBinary | Flag indicating that the contents of the file are binary | ||
| UILocalFileName | Name of the file on the client workstation | ||
| UILocalPath | Directory on the client workstation | ||
|
AskSelFile
|
UILocalFileName |
Name of the file on the client workstation | |
| UILocalFileExts | Extension(s) to filter the files to be displayed | ||
| UILocalPath | Directory on the client workstation | ||
|
AskExecShell |
UILocalShell |
Explanation of each parameter :
|
Parameters |
Description |
|
UILocalFileName |
Optional parameter |
|
UILocalFileExts |
Optional parameter |
|
UILocalPath |
Optional parameter |
|
UIRemoteFileName |
Optional parameter |
|
UIRemotePath |
Complete or partial path for the folder on the server where the file should be stored. Accept the canonical form Adonix : |
|
UIRemoteOverWrite |
Optional parameter |
|
UIRemotePathFile |
Complete or partial path for the file to be transferred : |
|
UIRemoteBinary |
Optional parameter |
|
UILocalshell |
The command to be launched |
Possible identifiers for the standard folders (Special Folders) on the client workstation:
#AllUsersDesktop :
The file system directory that contains files and folders that appear on the desktop for all users.
A typical path is C:\Documents and Settings\All Users\Desktop.
#AllUsersStartMenu :
The file system directory that contains the programs and folders that appear on the Start menu for all users.
A typical path is C:\Documents and Settings\All Users\Start Menu.
#AllUsersPrograms :
The file system directory that contains the directories for the common program groups that appear on the Start menu for all users.
A typical path is C:\Documents and Settings\All Users\Start Menu\Programs.
#AllUsersStartup :
The file system directory that contains the programs that appear in the Start-up folder for all users.
A typical path is C:\Documents and Settings\All Users\Start Menu\Programs\Startup.
#Desktop :
The file system directory used to physically store file OBJects on the desktop (not to be confused with the desktop folder itself).
A typical path is C:\Documents and Settings\username\Desktop.
#Favourites :
The file system directory that serves as a common repository for the user's favourite items.
A typical path is C:\Documents and Settings\username\Favourites.
#Fonts :
A virtual folder containing fonts.
A typical path is C:\Windows\Fonts.
#MyDocuments :
The file system directory used to physically store a user's common repository of documents.
A typical path is C:\Documents and Settings\username\My Documents.
#NetHood :
A file system directory containing the link OBJects that may exist in the My Network Places virtual folder. It is not the same as CSIDL_NETWORK, which represents the network namespace root.
A typical path is C:\Documents and Settings\username\NetHood.
#PrintHood :
The file system directory that contains the link OBJects that can exist in the Printers virtual folder.
A typical path is C:\Documents and Settings\username\PrintHood.
#Programs :
The file system directory that contains the user's program groups (which are themselves file system directories).
A typical path is C:\Documents and Settings\username\Start Menu\Programs.
#Recent :
The file system directory that contains shortcuts to the user's most recently used documents.
A typical path is C:\Documents and Settings\username\My Recent Documents.
#SendTo :
The file system directory that contains Send To menu items.
A typical path is C:\Documents and Settings\username\SendTo.
#StartMenu :
The file system directory containing Start menu items.
A typical path is C:\Documents and Settings\username\Start Menu.
#Startup :
The file system directory that corresponds to the user's Startup program group. The system starts these programs whenever any user logs onto Windows NT or starts Windows 95.
A typical path is C:\Documents and Settings\username\Start Menu\Programs\Startup.
#Template :
The file system directory that serves as a common repository for document templates.
A typical path is C:\Documents and Settings\username\Templates.
This parameter is used to identify the variable that will contain the information on the return of the instruction.
On return, the instruction returns the following information :
|
Action |
Value |
Meaning |
|
AskPutFile |
0 |
No transfer |
|
1,directory,file_name,extens[,appli] |
a file has been transferred |
|
|
-1 |
unexpected error |
|
|
-91 |
the indicated directory does not exist |
|
|
-92 |
access to the indicated directory is not authorised |
|
|
-93 |
the designated file already exists, operation prohibited |
|
| -94 | the indicated file does not exist | |
|
-99 |
service request not supported |
|
|
AskGetFile |
0 |
No transfer |
|
1, local path of the written file |
a file has been transferred |
|
|
-1 |
error during the transfer or on writing the file to the client workstation |
|
|
-91 |
the indicated directory does not exist |
|
|
-92 |
access to the indicated directory is not authorised |
|
| -94 | the indicated file does not exist | |
| -99 | service request not supported | |
|
|
||
|
AskSelFile |
||
|
0 |
No file selected | |
|
1, designated file path |
1 file has been selected + name of the selected file on the client in the canonical form (see. Filpath ) |
|
| -99 |
service request not supported |
|
|
AskReadTextFile |
||
|
Text |
UTF-8 text contained in the selected file | |
|
-99 |
service request not supported |
|
|
AskExecShell |
||
|
Text |
the stdout and the stderr in UTF-8 | |
|
-99 |
service request not supported |
This is a new instruction.
|
Error |
Description |
|
|
|
|
|