SCOUG Logo


Next Meeting: Sat, TBD
Meeting Directions


Be a Member
Join SCOUG

Navigation:


Help with Searching

20 Most Recent Documents
Search Archives
Index by date, title, author, category.


Features:

Mr. Know-It-All
Ink
Download!










SCOUG:

Home

Email Lists

SIGs (Internet, General Interest, Programming, Network, more..)

Online Chats

Business

Past Presentations

Credits

Submissions

Contact SCOUG

Copyright SCOUG



warp expowest
Pictures from Sept. 1999

The views expressed in articles on this site are those of their authors.

warptech
SCOUG was there!


Copyright 1998-2024, Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.

The Southern California OS/2 User Group
USA

SCOUG-HELP Mailing List Archives

Return to [ 02 | September | 2003 ]

<< Previous Message << >> Next Message >>


Date: Tue, 2 Sep 2003 21:08:50 PDT7
From: "Harry Motin" <hmotin@sbcglobal.net >
Reply-To: scoug-help@scoug.com
To: "Peter Skye" <pskye@peterskye.com > ,
Subject: SCOUG-Help: clipboard text shift ?


5
=====================================================
If you are responding to someone asking for help who
may not be a member of this list, be sure to use the
REPLY TO ALL feature of your email program.
=====================================================

Content Type: text/plain

Content-Transfer-Encoding: 7bit

Peter,

I did not test your code. However, the following VisProRexx program, RUN.EXE, works
the way that you earlier described. It takes the COMPLETE contents from the clipboard
and:

1. If you press the LEFT button, removes the first character from every line in the
clipboard and returns that result to the clipboard

2. If you press the RIGHT button, adds a space to the beginning of every line in
the clipboard and returns that result to the clipboard

3. If you press the CANCEL button, it closes down the RUN.EXE program

The program works on clipboard contents that contains 1, 2 or many lines. It operates
on every line and returns the result to the clipboard. It operates in Object Rexx, only.

If anyone desires, I can "recompile" it in Classical Rexx (so that it run there).

HCM

On Tue, 2 Sep 2003 10:18:08 PDT7, Peter Skye wrote:

>=====================================================
>If you are responding to someone asking for help who
>may not be a member of this list, be sure to use the
>REPLY TO ALL feature of your email program.
>=====================================================
>
>Harry Motin wrote:
>>
>> If you like, I can easily "upgrade" it as follows:
>>
>> (it only works under Object REXX.)
>> 1. Work under Classical REXX, only (I have
>> to "recompile" it under Classical REXX)
>>
>> (it only works on the first line of clipboard contents)
>> 2. Work on the right or left sides of every line in
>> the clipboard (multiple line clipboard contents)
>
>Hi Harry,
>
>Object Rexx is fine with me, but you may want to compile
>a Classic Rexx version so everyone can use it. I just
>switched to Object Rexx over the weekend (CodeAnalyzer
>requires it). So far I haven't had any problems running
>my Classic Rexx programs.
>
>Rexx has a built-in LastPos() function which you can use
>to quickly find each CR-LF and then Insert() a space
>directly after each one.
>
>I haven't tested the following but it might be close to
>what's needed:
>
> /* The following routine starts at the end of a string
> / and inserts a space after every line terminator.
> / It doesn't use the most efficient way of doing this
> / but the clipboard is limited to 64K (I think) so
> / the execution penalty is minimal. */
> /* Note: when a line is empty (i.e. CRLFCRLF) add the space anyway. */
> stClipboard = [the contents of the clipboard]
> stLineTerminator = '0D0A'x /* CR-LF; some files use other line terminators */
> /* Note: code sometimes does weird things with strings that are
> / "too short" so don't process strings of length 0 or 1. */
> if Length( stClipboard ) > 1 then do
> /* Note: start at length-2 so a space isn't added after a CRLF at very end */
> iStartOfNewLine = Length( stClipboard ) - 2
> do while iStartOfNewLine > 0
> iStartOfNewLine = LastPos( stLineTerminator, stClipboard, iStartOfNewLine - 1 )
> if iStartOfNewLine > 0 then
> stClipboard = Insert( ' ', stClipboard, iStartOfNewLine + 1 )
> end
> end
>
>Again, I didn't test the above (I'm real short on time this morning). If you want me to test
it and then post "good code" let me know.
>
>- Peter
>
>> It's your call. I have to do it later tonight, however.
>> HCM
>>
>> On Tue, 2 Sep 2003 03:47:51 PDT7, Peter Skye wrote:
>>
>> >=====================================================
>> >If you are responding to someone asking for help who
>> >may not be a member of this list, be sure to use the
>> >REPLY TO ALL feature of your email program.
>> >=====================================================
>> >
>> >Harry Motin wrote:
>> >>
>> >> Please try the attached VISPROREXX program.
>> >
>> >Harry, thanks a lot. I have attorney meetings coming up this morning
>> >and I'll check this out later today.
>> >
>> >Thanks again,
>> >
>> >- Peter
>> >
>> >
>> >=====================================================
>> >
>> >To unsubscribe from this list, send an email message
>> >to "steward@scoug.com". In the body of the message,
>> >put the command "unsubscribe scoug-help".
>> >
>> >For problems, contact the list owner at
>> >"rollin@scoug.com".
>> >
>> >=====================================================
>> >
>> >
>>
>> =====================================================
>>
>> To unsubscribe from this list, send an email message
>> to "steward@scoug.com". In the body of the message,
>> put the command "unsubscribe scoug-help".
>>
>> For problems, contact the list owner at
>> "rollin@scoug.com".
>>
>> =====================================================
>
>
>=====================================================
>
>To unsubscribe from this list, send an email message
>to "steward@scoug.com". In the body of the message,
>put the command "unsubscribe scoug-help".
>
>For problems, contact the list owner at
>"rollin@scoug.com".
>
>=====================================================
>
>


Content Type: application/octet-stream

File attachment: 834RUN.EXE


<< Previous Message << >> Next Message >>

Return to [ 02 | September | 2003 ]



The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA

Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.