#1
|
|||
|
|||
Reloading the session list
Hello.
We've written a script that we've used for some years now that fetches a session list from an external host and then creates sessions from there. The scripts first deletes a folder "Shared" in the session directory on the client and then creates new sessions from the list by cloning the default session and saving. We then run the script as a login script when connecting to our jump host. The issue is that after the sessions are created, new session do not show up until you restarts SecureCRT. Is there any API call that I can use to tell scrt to reload the session database? |
#2
|
||||
|
||||
There isn't a direct API for refreshing the session manager's contents.
You can refresh it manually by closing and re-opening your Session Manager (not just auto-hiding it). Perhaps this snippet of code might work, but I think it would require a script tab that is connected to a remote host. Code:
crt.Screen.SendSpecial("MENU_TOGGLE_SESSION_MANAGER") crt.Sleep(500) crt.Screen.SendSpecial("MENU_TOGGLE_SESSION_MANAGER") crt.Sleep(100)
__________________
Jake Devenport VanDyke Software Technical Support YouTube Channel: https://www.youtube.com/vandykesoftware Email: support@vandyke.com Web: https://www.vandyke.com/support |
#3
|
|||
|
|||
Many thanks, that did the trick.
I will try and post my code on github later to share with everybody. |
#4
|
||||
|
||||
The scripting API has been modified so that the Session Manager is automatically refreshed when a new session is added through a script. This support is available in SecureCRT 8.1, which is in beta testing. If you'd like to try it, please send email to me at Maureen.Jett@vandyke.com.
Maureen |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | Rate This Thread |
|
|