Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-08-2016, 07:03 AM
ogun ogun is offline
Registered User
 
Join Date: Sep 2013
Posts: 15
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?
Reply With Quote
  #2  
Old 11-08-2016, 10:48 AM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,068
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
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
Reply With Quote
  #3  
Old 11-11-2016, 10:11 AM
ogun ogun is offline
Registered User
 
Join Date: Sep 2013
Posts: 15
Many thanks, that did the trick.

I will try and post my code on github later to share with everybody.
Reply With Quote
  #4  
Old 12-05-2016, 12:05 PM
Maureen's Avatar
Maureen Maureen is offline
VanDyke Product Director
 
Join Date: Feb 2004
Location: Albuquerque, NM
Posts: 1,597
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
Reply With Quote
Reply


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:05 AM.