Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How too tell when Attachmate is ready to continue? 1

Status
Not open for further replies.

Coby5299

Technical User
Apr 1, 2012
5
US
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.
 
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

 
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?

 
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.
 
Thanks so much, thats seemed to work a lil better!
 
does "lil better" mean it still needs some improvement?
 
It still has a delay. but it is alot better what i tried before
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top