View previous topic :: View next topic
|
Author |
Message |
Deepakgoyal2005
New User
Joined: 22 Mar 2007 Posts: 57 Location: India
|
|
|
|
Hi,
For automating a manual task, I am trying to send data from excel sheet to mainframe application using VBA code. I am able to connect and communicate using following code,
Quote: |
Set MFscreen = GetObject("", "EXTRA.System").ActiveSession.Screen |
I am populating required string on mainframe screen using following code (which is working fine),
Quote: |
MFscreen.area(4, 9, 4, 10).Value = "ABCD" |
At an instance, I need to enter a value on mainframe screen in front of a particular string (say XYZ). For it, I would need the location of that particular string (XYZ) on mainframe screen. I am able to check that the required string (XYZ) is present on mainframe screen using below code,
Quote: |
MFscreen.WaitForString "XYZ" |
Although i am not able to check its (XYZ) mainframe screen position. Can anybody help in this regards? |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
Can you post a link to the Extra object reference? (Wherever you got GetObject("", "EXTRA.System").ActiveSession.Screen from) |
|
Back to top |
|
|
Deepakgoyal2005
New User
Joined: 22 Mar 2007 Posts: 57 Location: India
|
|
|
|
Thanks for your reply Ed,
I had been using "GetObject("", "EXTRA.System").ActiveSession.Screen" for all my macros and is working fine to connect Excel to Mainframe. I wanted to know if there is some keyword or a simple way to check string location on mainframe screen.
To showcase the scenario, say I have following screen,
Code: |
TESTMENU COMPANY 09/27/13 11:51:42 0001
ABCDEFG TEST SCREEN SYSTEM VERSION: 000
SRN OPT DESCRIPTION
--- --- --------------------------------------------------
_ XXX SERVICES 1
S YYY ABC SERVICES 2
_ ZZZ SERVICES 3
|
As shown above, I want to know the location of 'YYY' on the mainframe screen and write 'S' in front of it and 'ABC' after the string. I am facing problem checking the location of string 'YYY' which is (07/07) in above example. Let me know if I had missed any information useful to analyze the issue. |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
I totally get that. I was hoping you could post the link to the object refence manual so that I could look for something to help you with. I don't have the Attachmate books, so I can't help.
I've done lots of HLLAPI, and there is usually a large set of instructions for reading/writing the screen.
there's even small chance that the WaitFor method returns the location, but it's probably a single number so you'd have to do the math to get row/column. |
|
Back to top |
|
|
|