×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Copying part of a session screen.

Copying part of a session screen.

Copying part of a session screen.

(OP)
Presently if I want to copy part of a screen to another application, I have to select the area of the screen, copy and paste text into the target application.  I have written a macro that finds the selected area, but when I paste it, none of the <CRLF> are there.  

How do I get the <CRLF> into my clipboard?

Here is the code being used now

Dim Buffer As String
Dim objSystem as Object, objSessions as Object, objSession as Object, objScreen as object, abjArea as object
    
Sub Main    
    set objSystem = CreateObject("EXTRA.System")     
    set objSessions = objSystem.Sessions
    set objSession = objSessions.Item(1)      
    Set objScreen = objSession.Screen
    Set objArea = objScreen.Selection
    Buffer$ = objArea

End Sub

RE: Copying part of a session screen.

What exactly are you trying to move to the other application? I'm always at a loss why everyone is so averse to just getting the data they need with GetString methods.

If you know the location you need, then

MyVariable = Sess0.Screen.GetString(X,Y,Stringlen)

calculus

RE: Copying part of a session screen.

(OP)
I use GetString in several other macros when x, y, or string length can be determined.  I have an macro that will
grab an predetermined area by using GetString in a loop

In this Macro, GetString will not work since the area to be copied will varies randomly .
  for example:  to respond to an email I want to copy from
      position 4,2 to 5,28.  Another email I want to copy
      position 9,4 to 16,33.  For a presentation I want
      to copy position 11,6 to 22,49. And so on . . .

Rather then ask each time for the starting and ending point, I would like to select the area as if I was going to do a Edit >> Copy.

Once I have the area selected, I can't get the macro to determine the start and end of the selected area. If I can get the macro to determine the start and end, then I have a subroutine that will put in the CRLF

RE: Copying part of a session screen.

Selection.top and Selection.left should allow the macro to know where the X, Y for the starting position are. Selection.right, selection.bottom will give you the end co-ordinates.

Hope I understand the question.

calculus

RE: Copying part of a session screen.

(OP)
Thanks,

It Works!!!!!!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close