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!

Waithostquiet... how many time???

Status
Not open for further replies.

mbars

Technical User
Oct 30, 2002
5
0
0
IT
My Extra! (6.5 sp1) macro has at top
...
Global g_HostSettleTime%
...

then
...
g_HostSettleTime = 1200 ' milliseconds
...

every call such:
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)

will (several times) wait 1,2 second then the macro goes on, BUT occasionally the macro seems to hang-up and seems to wait without end. This situation doesn't let me share my macros with my coworkers! I tryed some debugging but I haven't found anything...

May be a problem having declared the variable with a '%' (integer) and using that one without the '%' ???

Thanks very much!
 
Has anyone found some problem using waithostquiet???
 
I had this problem. If you pass in the settle time to the function, it does weird things and doesn't seem to wait. It also sometimes will wait the entire time even if it is done, and it even slowed the host down...Try this:

Private Function ExtraWaitHostQuiet(Optional ByVal p_iTimeout As Integer = 10000) As Boolean
Dim oExtraSystem As Object

Set oExtraSystem = CreateObject("EXTRA.System")

oExtraSystem.TimeoutValue = p_iTimeout

clsExtraAppInterface_WaitHostQuiet = oExtraSystem.ActiveSession.Screen.WaitHostQuiet()

Set oExtraSystem = Nothing

End Function
 
The WaitHostQuiet has always performed as a pause in miliseconds for me. I rarely use it.

Try telling the system to wait for a specific screen.
rc% = ...WaitforString "Whatever", x,y
This wait function will time out after a longer time (30 secs or more) and the code continue.

This eliminates any timing issues with the host. The problem with WaitHostQuiet is that it just waits, then continues. Depending on the code, this could cause some unexpected outcomes.
 
Solo per dimostrare che c'è ancora qualche Italiano in giro e che usa Extra Attacmate
MBARS se ci sei batti un colpo possiamo scambiarci qualche info su questa applicazione Host 3270 che ne dici.?
gss.italy@iol.it
 
garrett1977 could you explain that function alittle more, and mbars:

that # 1200 represents how many milliseconds that the macro is going to wait before firing try lowering the # and the macro will preform faster.

as for the not working on other machines I have found that different machines run at different speeds. what I would do is use WaitForString to check something something on the screen every page you navigate through(maybe the page name), and use moveto to navigate instead of sendkeys (so your not assuming that you are where you want to be on the page). This way with the wait for string you slow your macro to the speed of the machine, rather than assuming it is 1200 milliseconds.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top