Go to Google Groups Home
Groups 
Advanced Groups Search    Groups Help 
 
Groups search result 9 for apmt os/2

Search Result 9
From: Mark Schlegel (schlegel@crocker.com)
Subject: Re: OS/2 RX HTML/URL and Clipboard
Newsgroups: comp.lang.rexx
View: Complete Thread (4 articles) | Original Format
Date: 1998/11/04
Dave wrote:
: 
: 
: Two quick questions.
: 
: how do I retrieve a HTML file with rexx?  rxFTP didn't work for me.

It works for me, you have to be careful with the FtpDir
function because it returns the file names in the directory
like this format

-rw-r--r--   1 moschleg 84            610 Feb 12  1998 index.html

so if you didn't know this and did this:
==== start===
whatdir = "~"
Call FtpSetUser hostname, usrname, psword
Call FtpChDir whatdir
call ftpdir "*.html", "output."
do i = 1 to output.0
  call FtpGet output.i, output.i || "bakup", 'ascii'
end i
====end====

it would fail at the FtpGet because it really wants the last word
("index.html") so rather do:

====== start ====
whatdir = "~"
Call FtpSetUser hostname, usrname, psword
Call FtpChDir whatdir
call ftpdir "*.html", "output."
do i = 1 to output.0
  theFile = word(output.i, words(output.i))
  call FtpGet theFile, theFile || "bakup", 'ascii'
end i
=======end====

This would copy  all the .html files in ~ on the remote
host to your local directory.  You may have a problem any
number of places, you can check the FtpApi help .inf 
in the information folder.  Also try to  use the 
RC codes and run your script in trace mode so it shows
you the problem.  You are registering the FtpApi aren't you? -->

Call RxFuncAdd "FtpLoadFuncs", "RxFtp", "FtpLoadFuncs"
Call FtpLoadFuncs "RxFtp"

: And can I cut and paste to/from the clipboard?

There's tons of rexx add ons that do that, try RxExtra,
Rexxlib, APMT (mentioned before recently in this group)

APMT for example you would do this via api functions

related:
  sysmenu_select("Copy All")   // copies foregnd window to clip
  select_window()  // for selecting window to foreground (see .inf
                  // that comes with apmt

the copy:
  query_clipboard_text("stem")

this copies the clipboard into stem 'stem.'

here's a useable example of using this, print the clipboard:

call sysmenu_select "Copy All"
call query_clipboard_text "clip"
do i = 1 to clip.0
   call lineout LPT1, clip.i
end i

Mark

you can get it here:
ftp://wuarchive.wustl.edu/systems/os2/ibm/ews/apmtst.zip


Google Home - Advertise with Us - Add Google to Your Site - News and Resources - Language Tools - Jobs, Press, Cool Stuff...

©2002 Google