Tags:
tag this topic
create new tag
view all tags
---+ Client-Side Processes & File Transfers This page is intended for APPX Release 5.0 and earlier. In Release 5.1 various API's were introduced to perform these functions. See <a href="0LASubrClientDownloadFile" target="_blank">.CLIENT DOWNLOAD FILE</a>, <a href="0LASubrClientUploadFile" target="_blank">.CLIENT UPLOAD FILE</a> and <a href="0LASubrClientLoadUrl" target="_blank">.CLIENT LOAD URL</a>. ---++ APPX Release 5.0 and prior From ILF code on the server, you can now push files to the Java Client, pull files from the Client, and run a command line on the Client. <strong>Sending a file to the client <br /></strong>------------------------------- You can send a file to the client with a CALL command. If the destination filename is left blank, the client will open a dialog file browser so the use can place and name the file themselves. The value they select will be returned to the server and placed in the destination field. If the destination path is relative, it will be relative to the location of the Java Client JAR file location. While the file is in transit, the client will show a progress slider and the APPX session will wait until the file transfer completes before returning from the CALL statement. The T/F indicator will tell you if the transfer completed OK or not. <pre>SET 1EX WORK SOURCE = C:\REGO.TXT SET 1EX WORK DESTINATION = REGO99.TXT PASS 1EX WORK SOURCE FIELD SHARE? Y PASS 1EX WORK DESTINATION FIELD SHARE? Y CALL ,RT_SEND_FILE RESIDENT? Y END? N FAIL 0 </pre> WORK SOURCE and DESTINATION are not actually fields in 1EX. These workfields must be large enough to hold your passed values. <strong>Pulling a file from the client </strong><br />--------------------------------- You can pull a file from the client with a CALL command. If the source filename is left blank, the client will open a dialog file browser so the user can pick the file themselves. The value they select will be returned to the server and placed in the source field. If the source path is relative, it will be relative to the location of the Java Client JAR file location. While the file is in transit, the client will show a progress slider and the APPX session will wait until the file transfer completes before returning from the CALL statement. The T/F indicator will tell you if the transfer completed OK or not. <pre>SET 1EX WORK SOURCE = SET 1EX WORK DESTINATION = /tmp/upload.txt PASS 1EX WORK SOURCE FIELD SHARE? Y PASS 1EX WORK DESTINATION FIELD SHARE? Y CALL ,RT_RECV_FILE RESIDENT? Y END? N FAIL 0 </pre> <strong>Running a command line on the client <br /></strong>-------------------------------------------- Using a version of the RT_LOAD_URL call, you can run a complete command line on the client machine. This is done by starting the command with the '@' symbol. This means run the command as is, at the client. This examples will take the results from the previous SEND and run Notepad against it on the client. <pre>SET --- TEMP 80 = @NOTEPAD.EXE APPEND --- TEMP 80 1 1EX WORK DESTINATION SET --- LI = 80 PASS --- TEMP 80 FIELD SHARE? Y PASS --- LI FIELD SHARE? Y CALL ,RT_LOAD_URL RESIDENT? Y END? N FAIL 0 </pre> <strong><span>=====</span></strong> <br /><strong>Example <br /></strong>========= This example will download a print file and a print config file to a client and run winprint on the client to print the file. This assumes that the client already has a copy of winprint.exe in the same location as the JAR file or in the active PATH. <pre>SET 1EX WORK SOURCE = /tmp/PRT0001 SET 1EX WORK DESTINATION = PRT0001 PASS 1EX WORK SOURCE FIELD SHARE? Y PASS 1EX WORK DESTINATION FIELD SHARE? Y CALL ,RT_SEND_FILE RESIDENT? Y END? N FAIL 0 * SET 1EX WORK SOURCE = /tmp/PRT0001.cfg SET 1EX WORK DESTINATION = PRT0001.cfg PASS 1EX WORK SOURCE FIELD SHARE? Y PASS 1EX WORK DESTINATION FIELD SHARE? Y CALL ,RT_SEND_FILE RESIDENT? Y END? N FAIL 0 * SET --- TEMP 132 = @WINPRINT.EXE APPEND --- TEMP 132 1 -config=PRT0001.cfg APPEND --- TEMP 132 1 PRT0001 SET --- LI = 132 PASS --- TEMP 132 FIELD SHARE? Y PASS --- LI FIELD SHARE? Y CALL ,RT_LOAD_URL RESIDENT? Y END? N FAIL 0 </pre> ---++ Comments: _Read what other users have said about this page or add your own comments._ --- <br />%COMMENT%
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r3 - 2020-05-12
-
JeanNeron
Home
Site map
Main web
MedicaidBilling web
Sandbox web
TWiki web
Main Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
E
dit
A
ttach
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback