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

HostSettleTime 1

Status
Not open for further replies.

FrankMhere

Technical User
Jul 2, 2007
4
US
Is this part of code really necessary?

Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
 
I don't use it. I prefer to watch for some screen indication (Cursor location, format ect.) that the page I'm expecting has loaded.

If you'd like some help tidying up your code post it.

[thumbsup2] Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.


 
I use wait state alot. If you are going to move a cursor and put a string somewhere, you wont need it. But if you are running a mainframe application that if you send keys to fast it hangs, like Fidelity, then you are better off including them. When I use them I cut the time from the default 3000 ms to 40 ms. I find checking for cursor positioning to be inconvenient for me. I have over 400 macros that I have written over 7 years that I just copy and paste code into new macros, and never bother taking them out.
 
This may be what CompuDork was referring to, but I use the OIA.XStatus property to check the state of the "status bar". If the mainframe is processing slow then this will allow you to wait until it is finished before performing the next task. I typically use a g_HostSettleTime = 50 so that it moves on as quickly as possible.

Code:
Do Until Sess0.Screen.OIA.XStatus = 0
    Sess0.Screen.WaitHostQuiet (g_HostSettleTime)
Loop
I use this most of the time and on occasion may need to use the .WaitforString or .WaitforCursor but I prefer the OIA.XStatus method.
 
I use both screen idicators in a DO/WHILE Loop to secure the correct screen like

Do while Sess0.Screen.Area(01,01,01,17) <> "UNIT SIZE AS CUBE"
Loop

and the

Do Until Sess0.Screen.OIA.XStatus = 0
Loop

as my delay while the screen refreshes.

VVFast
 
thanks for the input. I wasnt aware of the Sess0.Screen.OIA.XStatus property. I write alot of macros based on both attachmate and pcomm and never looked into that property.
 
ChrisWhite123, removing the Sess0.Screen.WaitHostQuiet (g_HostSettleTime) from the middle of my loop has already saved tons of time in my processes. You wouldn't think that 50 ms would slow things down that much, but the difference is astounding. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top