View Single Post
  #10  
Old 09-17-2020, 08:16 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,436
Hi sussington,

The only thing different is what you said your initial command sent needs to be.

So it would look something like below. Note that you need to put in whatever your shell prompt is where noted:

Code:
# $language = "Python"
# $interface = "1.0"

from datetime import datetime

def Main():
    
    CRT = crt
    Screen = CRT.Screen
    Screen.Synchronous = True
    Screen.Send("config t\r")
    Screen.WaitForString("your_shell_prompt")

    Now = datetime.now()
    Formatted = Now.strftime("%H:%M:%S %d %b %Y")
    Screen.Send("clock set " + Formatted + "\r")

Main()
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote