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

LOOP on cursor position....

Status
Not open for further replies.

2009luca

Programmer
Jul 27, 2013
222
IT
generally i use the code:

Do Until oScreen.WaitForCursor(row, col)
DoEvents
Loop

to check cursor position...

but if the cursor dont change position, the until run to the infinity loop, or not?

if yes, instead to use the Until statement is possible to use a for next similar:

for i=0 to 35000
'check psotion of cursor 4,5
next i

if i>35000 then
msgbox("Attention Extra locked,ecc...")
end if

code for this exception, please.

Sorry for my bad English.
 
Hi,

You would user WaitForCursor after issuing a command to the mainframe from your terminal emulator on your PC, since the mainframe processes asynchronously from your PC. Realize that each screen can have different rest coordinates. So prior to issuing a mainframe command, 1) move the cursor away from the rest coordinates, 2) SendKeys to the mainframe and then 3) start your WaitForCursor loop at the rest coordinates.

You may also want to start a timer before looping if you want to arbitrarily pick a duration to abort the wait AND subsequent processing after perhaps 10 seconds.

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