×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

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!
  • Students Click Here

*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

Jobs

AttachMate Extra: Capture and compare information - Help me please!!!!!

AttachMate Extra: Capture and compare information - Help me please!!!!!

AttachMate Extra: Capture and compare information - Help me please!!!!!

(OP)
Hello!

I am a beginner in VBA and would like to know how to find information on the screen to take a certain action.

I can do the loop to repeat the action when a cell in Excel is filled, however I need to locate a sequence of characters on the screen and when located, I would use the "SendKeys" method to take an action inside this screen.

All code is ready, but I can not do this.

Can you help me?

Forgive me for English, I do not speak fluent English.

RE: AttachMate Extra: Capture and compare information - Help me please!!!!!

Hi,

Are you coding in Extra VB (yuk!) or are you coding in Excel VBA (hurray!!!)?

Please post the code that you are using.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: AttachMate Extra: Capture and compare information - Help me please!!!!!

(OP)
Thanks for the answer

I'm using VBA, but i do not have a good logic to continue

CODE

Dim Sessions As Object
    Dim System As Object
    Dim ExcelApp As Object
    Dim myinfo As String
    
    Set System = CreateObject("EXTRA.System")
    Set ExcelApp = CreateObject("Excel.Application")
    
    Dim Sess0 As Object
    Set Sess0 = System.ActiveSession

'If the captured information is the same as cell "B2" then

'Position cursor in front of what was found and

    Sess0.Screen.SendKeys (<left><left><left>"S"<PF2>)

'after the above command search for the word "RPER" and position cursor on the front of what was found and

    Sess0.Screen.SendKeys (<left><left>"S"<PF12>)
    Application.Wait (now + TimeValue ("00:00:01"))

    Sess0.Screen.SendKeys ("R"<tab><tab>"1234")

if at line 22, column 02 = "" then
Sess0.Screen.SendKeys ("123456789" <enter>)

else

Sess0.Screen.SendKeys (<enter>)

end if 

As you can see, I only know how to send commands from the keyboard to the screen, but not to search according to the cell

Thanks for your attention,

RE: AttachMate Extra: Capture and compare information - Help me please!!!!!

Thank you for posting your code. I assume that you’re coding in Excel VBA. So your code does not need to create an Excel Application object.

So typically when you have a terminal emulator application like Attachmate Extra, that emulates a dumb terminal of some kind, you are dealing with transactions or screens. It might behave something like this, once you have logged into the mainframe system via your emulator.

1) Clear te screen and enter a transaction or screen name as a command, like:
/FOR REQORDS

The mainframe system responds by painting the screen with a the REQORDS form.

2) With the empty form on the screen, you, or your program, are ready to enter one or more search terms into formatted fields in the form.

3) Once the search term(s) are entered, then you SEND a command to the mainframs that instructs the mainframe program to do something, perhaps fill the form with data relevant to the search terms that were just SENT to the mainframe.

4) When the mainframe has completed obtaining the data and returning the data to the form, now you, or your program, must take some or all of the data and put it somewhere else, like in a spreadsheet.

I often provided a service for my users. They would provide me a list of items in a speradsheet, and a request to get certain data for each item. I knew which transaction I needed to access, so my program would loop through the list of items, fill the item on the form, SEND the appropriate command, wait for the mainframe to return the data, grab ALL the data from the form, put the data into a spreadsheet containing all the fields on the form and repeat for each item in the list.

What does your process look like?

It would help us if you would also post a copy of this screen and the list of items you are using from Excel, so that we can see the value in B2 and the corresponding value on your screen.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: AttachMate Extra: Capture and compare information - Help me please!!!!!

(OP)
Hi SkipVought !!!

First thanks for your attention

I work in the financial area using banking systems and because of the rigid security I can not prove to exemplify better.

What I can try is the following:

First: the system will type the search key in cell A1 (image1)

As for the search key, I usually access it because all the names are registered in the system. Once it is accessed, it enters the screen called "Find Transaction".

Up to this point I can successfully access using the search name and access to the screen.

I got a test version of the software and I'll try to explain it this way:

I search the system the client "Douglas", according to cell A2. When I access the screen (image1) I have all these letters and numbers. On this screen, I need to search the information 123456789 and position the cursor before the first number (look that cross-line indicates where the cursor position). If on the run it does not find this information, it will look for the John client with the key that is in cell B3 and so on to where to end the list. If it finds it it will enter the letter "S" and press F2 (same as the Sendkeys command that I reported before).

On the screen he accessed, he will search for the word "Process the mail log", put the letter "V" and press F2. (image2)

When he gives this action, the system will display the message "Send with success" and will search for the client Michael and repeat the whole process.

I hope I have succeeded in showing what I really need with this example.

Sorry for not being able to leave better examples.

Thanks for your attention!!!!

RE: AttachMate Extra: Capture and compare information - Help me please!!!!!

I only see one image showing two screens 1) VM/SP & 2) PROFS MAIN MENU.

Plz upload image 2.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: AttachMate Extra: Capture and compare information - Help me please!!!!!

Quote:

First: the system will type the search key in cell A1

Where does “the system” get the search key to put it into A1 on the Excel Spreadsheet?

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: AttachMate Extra: Capture and compare information - Help me please!!!!!

(OP)
The worksheet is populated by a user. What this macro would do is paste the information from column A1 and press enter to access the client. Then he would look up the information in column B2 and so repeat until the columns information is finished.

RE: AttachMate Extra: Capture and compare information - Help me please!!!!!

Why A1 and B2?

Are you sure it’s not A2 and B2?

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: AttachMate Extra: Capture and compare information - Help me please!!!!!

So how is the value in A2 searched for?

What screen?

Where on that screen is the value entered?

What command is sent to the mainframe?

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

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!

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