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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Has page finished loading

Status
Not open for further replies.

smiler44

Technical User
Sep 18, 2009
83
0
0
GB
I may not have all the right terms but I'll do my best to explain

I am using visual basic version 5 to control sending data and copying data from an Attachmate screen.
When I "press enter" at the bottom of the Attachmate screen I get
I think a cross and a small clock at the bottom of the attachmate screen toward the left, when Attachmate has finished I think I have a small clock and something else at the bottom but near the middle.

How do I determine what state attachmate is in, still dealing with my enter command, or if it has finished with my enter command or indeed any command such as tab?

Attachmate or the program it is connected to sometimes runs slow and I'm struggling to work out how to make sure my commands have been executed before sending the next command.

thank you in advance

smiler44
 


hi,

A technique that I use with success is to 1) MOVE the cursor away from the Screen Cursor Rest Position, which is different for each screen, 2) issue the SendKeys command, 3) WaitForCursor at the coordinates of the Screen Cursor Rest Position in a Do ... Loop
Code:
with oScrn
    .MoveRelative 1, 1, 1
    .SendKeys ("<enter>")
    Do Until (.WaitForCursor(KeyRow(sScr, 1), KeyCol(sScr, 1)))
        DoEvents
    Loop
end with


Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
SkipVought, thank you.
Once the cursor has been found at the new location will I need to move it to where i want data to be entered before sending data? What's Screen Cursor Rest Position? Is this the cursors location when each page loads?

I'm not a programmer more hobbiest so i have to ask, will the code you have given me work as is or do i need to delcare anything?

I was expecting somethng simple like

do until clockvalue = 1
loop

thnak you for your help

smiler44
 


I don't recommend using the cursor location to put or get data on/from the screen. Use Put or Get with exact coordinates/Length.

Yes, it is where the cursor rests when a new transaction or command is issued.

Use your screen object, however you have declared it. Also my example had an array for the row & col location. Just use your screen rest row, col.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Thanks I'll give it a go.

errrmmmm, whats an array? Serious quetion!

smiler44
 

An array is a variable that contains multiple elements that can be used to store and retrieve data in your program. Most variables are not arrays. It is up to the programmer to determine what variables are required in order to perform the necessary task.

You ought to do some Programming 101 self learning, ESPECIALLY before venturing into this klunky programming world of asynchronous processes!

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top