Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > Scripting

Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 08-06-2019, 08:42 AM
bgagnon bgagnon is offline
VanDyke Technical Support
Join Date: Oct 2008
Posts: 4,395
Hi CAPflyboy,

Originally with your script (edited a bit to fit my environment), I got the same results as you reported. But after a few tweaks, it runs the same with or without the MsgBox(). The presence of the MsgBox() should not change the results, but what it does is if your script is out of sync, it allows it to get back in sync, so I think that's what you were seeing.

The major changes I made were:
  • Reduced the number of times you set Synchronous to True/False. You should set it True after the connection line in ConnectSession() function and then to False in the ExitSession() function.

  • In the ExecuteCommands() function, there are numerous occasions where you don't follow the best practice described in the scripting manual (section 4.2) that there should be a WaitForString() following each Send() command. And for sure you want to uncomment this line:
        crt.Screen.WaitForString "EDT"
  • Lastly, changed ExitSession():
        crtSc.Send "logo"
        crtSc.WaitForString "logo"
        crtSc.Send vbCr
        crtSc.synchronous = False
            crt.Sleep 25
        Loop While crt.Session.Connected

VanDyke Software
Technical Support
(505) 332-5730
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 04:24 AM.