×
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!

*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

How too tell when Attachmate is ready to continue?

How too tell when Attachmate is ready to continue?

How too tell when Attachmate is ready to continue?

(OP)
Hello All,
Im new to the prgammer world so please excuse any lack of knowledge.

I am using the Attachmate Extra system and on one of the screens there is a delay before the resolves show. Is there a way to tell when the screen has updated and the system is ready to move on?

Ive tried using wait codes:
waithostquiet
Application.Wait Time + TimeSerial(0, 0, 1)

but none seem to work. Any other ideas or suggestions. Thanks in advance.  

RE: How too tell when Attachmate is ready to continue?

one method i use is to first move my cursor to a position on the screen that isn't used, for example, sess.moveto 1,1
prior to executing my find or enter command. then i just wait until the cursor is no longer on 1,1
something like this

CODE

sess.moveto 1,1
sess.sendkeys ("<enter>")
do:doevent:loop until sess.row <> 1 and sess.col <> 1

 

RE: How too tell when Attachmate is ready to continue?

(OP)
Thanks, but the issue appears to be the screen doesnt refresh with the current info before my code continues to run.  for example:

sess.screen.sendkeys("my info <enter>"

''need code to wait until screen has changed with requested info''

range("A1")=sess.screen.getstring(2,15,3)
range("A1")=sess.screen.getstring(2,15,3)

Or is there a way to capture a screenshot and wait until the captured shot is not the same as the new screen?

 

RE: How too tell when Attachmate is ready to continue?

hi Coby5299,

what i do is to move my cursor to row1/column1 prior to evoking the enter command. i then use a do:loop until the row position and column position is changed. what that sigifies to me is that the screen has refreshed.

the way  my screen works is that after an enter command, the cursor is expected at a certain position on the screen, and that position will never be 1,1.

give it a try and see if that works.

RE: How too tell when Attachmate is ready to continue?

(OP)
Thanks so much, thats seemed to work a lil better!  

RE: How too tell when Attachmate is ready to continue?

does "lil better" mean it still needs some improvement?

RE: How too tell when Attachmate is ready to continue?

(OP)
It still has a delay. but it is alot better what i tried before

RE: How too tell when Attachmate is ready to continue?

If you are sending data to attachmate and the screen has to change before sending the next bit of data to attachmate would this work?

Manually send the date, once the screen has updated and changed find a word thats there now that was not there before.
You will need to know the postion on the screen and how many charectors long the word is
you can then use code along the lines of.

bla
bla
bla
enter

Dim foundtext as string

foundtext = (1,3,5)

do until foundtext = "word your looking for"
loop

bla
bla
bla

1 is rowdown, 3 is column along, 5 is the number of charetors long the word your looking for is.

The problem comes when your tabing around the screen, how do you know attachmate is ready for more data

smiler44

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