check out copyappend method
Dim Sys As Object, Sess As Object
Set Sys = CreateObject("EXTRA.System")
Set Sess = Sys.ActiveSession
Set Sess = Sess.Screen
Sess.area(2, 18, 2, 23).Select
Sess.CopyAppend
Sess.area(3, 19, 3, 43).Select
Sess.CopyAppend...
this should work
Sub Main()
Dim Sys As Object, Sess As Object
Set Sys = CreateObject("EXTRA.System")
Set Sess = Sys.ActiveSession
Set Sess = Sess.Screen
sess.Area(3, 19, 3, 43).select
sess.Area(3, 19, 3, 43).copy
End Sub
this is from the help file for 7.1
This example first copies the entire session screen to the Clipboard, then copies an area of the screen to the Clipboard.
Sub Main()
Dim Sys As Object, Sess As Object, MyScreen As Object, MyArea As Object
' Invoke the clipboard viewer
Shell("clipbrd.exe")...
after evoking the sendkeys, the cursor moves to the end of the string whereas evoking putstring the cursor remains where it was.
if your cursor is not in a field that can contain data, the sendkeys will not work; you should receive an error of some sort whereas the putstring will actually place...
MazzaB,
WaitHostQuiet works for me in Excel VBA.
i don't see the WaitHostQuiet in your code though.
how about adding this?
Do While Sess.OIA.XStatus <> 0
Loop
You are trying to capture 50 rows of data from Attachmate?
i can't change my attachmate screen to show more than 24 rows...
MazzaB, are you saying that an Attachmate Macro will work vs an Excel Macro?
you said
are you saying that your cursor is always on row 1, col 23 or col 24? and the "new" data begins in row 25?
result = Sess0.Screen.GetString(Row, 1, 50) will begin on row 1 and not row 25.
did you try skip's...
the answer is in part of your code
Sess0.Screen.SendKeys ("<HOME>mtcc<enter>")
use Sendkeys
Sess0.Screen.SendKeys ("anm")
otherwise, you may use Putstring. See Help file for more information. Use Putstring instead of tabbing to the field to enter your information
hth
za
dvirgint,
what Skip has been trying to point out is that your search string does not specify where to search from:
Set MyArea = MyScreen.Search("HELLO",r,c)
Set rad_find = MyScreen.Search("Radiation par")
also, there's no need for this:
Loop Until Row = 23
all you need to do is test for where...
dvirgint,
without seeing your code, i'm not sure what it's doing. after finding the first string, where did you place the cursor? i'm thinking if your found string is at the end of the row, this may fail.
when you copied my code into a module, did you try it out with the search for "HELLO"...
see if this helps you understand
Sub Main
Dim Sys As Object, Sess As Object, MyScreen As Object, MyArea As Object
Set Sys = CreateObject("EXTRA.System")
Set Sess = Sys.ActiveSession
Set MyScreen = Sess.Screen
r = 1
c = 1
Do
Set MyArea =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.