#1
|
|||
|
|||
Send and sleep - slow when running script
Any advice or further information on the Sleep() method would be greatly appreciated. I've read many other threads about WaitForString, but have not needed to utilize it in older versions of SecureCRT. The issue has only been experienced in v6.6.1 (build 289).
We use SecureCRT to display a form like UI on the screen. In most cases my script waits (Sleep) until the cursor is in a specific location for a certain amount of time (Do/Loop w/ Sleep) before it sends a string & CR and finds those specific cursor locations during initialization. In the initialization, I use the function below quite often to get to a standard starting point, but the screen is not updating like it does with older versions. No issues with v6.5.4(build 555). Code:
Function backToHomeMenu() For counter = 1 To 50 crt.sleep 500 menuOption = Trim(crt.screen.get(1, 53, 1, 60)) If menuOption = "MENUTXT" Then Exit Function ElseIf menuOption = "MENU2TXT" Then crt.Screen.Send "1" & vbCr crt.sleep 500 Else crt.Screen.Send vbCr crt.sleep 500 End If Next End Function Function aCursorSend(r, c, wordsToSend) Dim rRow, cCol, curRow, curCol For counter = 1 To 800 crt.sleep 20 rRow = r cCol = c curRow = crt.screen.CurrentRow curCol= crt.screen.CurrentColumn If curRow = rRow Then If curCol = cCol Then crt.screen.send wordsToSend & vbcr crt.sleep 40 Exit Function End If End If Next End Function |
#2
|
|||
|
|||
Hi jlev,
I can find nothing that would point to a change in behavior of the Sleep() function between the versions you have listed. So I would say if v6.5.4 works as desired, then maybe just continue using the older version.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|