#1
|
|||
|
|||
![]()
Here's my use case: I'm doing a tail -f on a file and I have a mapping to send a string that hits return several times, draws a line of dashes, then a few more returns.
That works fine. What I'd really like is the ability to insert variables into the string such as the current time as I've mocked up below. \n\n\n\n\n------------------{HH:MM:SS}---------------------------------\n\n\n Is there a way to do this? The session is in tail, so doing a date +%H:%M:%S or something similar that would have to be processed on the server won't help. |
#2
|
|||
|
|||
Answering my own question with a HORRIBLY ugly hack that I would be embarrassed to use.
![]() \n\n\n\n\032date\nfg %-\n\n\n\n |
#3
|
|||
|
|||
Hi ZekeB,
There aren't any substitutions for date/time available in SecureCRT for plain mapped keys SEND STRING operations. I have added a feature request on your behalf to add this functionality in SecureCRT. If this functionality becomes available in a future version, we will be sure to let you know. If you would like to be notified directly please send an email to Support@VanDyke.com with "Feature Request Forum Post 13352" in the subject line. In the mean time, you can get the behavior you desire by mapping your key combo to run a script instead of using the SEND_STRING function. For example: Code:
# $language = "Python" # $interface = "1.0" import datetime g_strDateTimeTag = datetime.datetime.now().strftime("%H:%M:%S") strLeaderDash = "-" * 30 crt.Screen.Send("\r\n\r\n\r\n{0}{1}{2}{3}{4}\r\n\r\n\r\n".format(strLeaderDash, "{", g_strDateTimeTag, "}", strLeaderDash), True)
__________________
Thanks, --Brittney VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#4
|
|||
|
|||
![]()
Cool! Thank you very much, Brittney!
|
![]() |
Thread Tools | |
Display Modes | |
|
|