Quite a regular 
Joined: 2008/3/15 2:00 Last Login
: Today 4:09
From Canada
Group:
Registered Users
|
Update...
I understand what jabirulo was suggesting ...
POSITION SOF MARK ON POSITION EOF COPY
was supposed to mark the text from start of file to end of file, then copy the text to the clipboard.
After alot of trial and error, today I got the COPY command to work, but I have to manually highlight the the text with the mouse. I can't get the other commands to work. I just get a "received ok" response from the texteditor gadget.
The following ARexx command seems to copy the highlighted text to the clipboard.
call topipe('ID 'TE' command="COPY"')
ID 'TE' is a variable name for my texteditor gadget.
However, when I try to copy from the clipboard to a text file, the text has a filetype header imbedded in the first line.
FORM2FTXTCHRS&
Again ... rather than reinvent the wheel, I decided to just use NotePad instead. I can prefill text into the textfile, edit with NotePad if I need to make changes, save the file and move on. It is easy to launch NotePad using an ARexx script.
address command 'SYS:Utilities/NotePad "filename"'
Update...
Used ARexx delete string command to delete those extra characters in the clipboard file. There must have been some nonprintable characters, because I could see 14 but had to delete 20.
Now working fine without NotePad. Please note, my program is not a replacement for NotePad or any other editor. This is simply a learning exercise to get more experience tinkering with ARexx and AWNPipe. I still have alot of debug code, but it works now.
I must highlight all the text in the editor window. I use the COPY function to copy from editor to clipboard, then I "save" the text back to the original text file by using ARexx readln and writeln commands to copy from clipboard to text file.
Cheers, redfox
Edited by redfox on 2025/9/13 4:04:12 Edited by redfox on 2025/9/13 4:08:55
|