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
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.
If you know the location you need, then
MyVariable = Sess0.Screen.GetString(X,Y,Stringlen)
calculus
RE: Copying part of a session screen.
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.
Hope I understand the question.
calculus
RE: Copying part of a session screen.
It Works!!!!!!