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 05-17-2018, 09:01 AM
ngrison ngrison is offline
Registered User
 
Join Date: Aug 2017
Posts: 16
crt.GetTab(i) and Locked Sessions

Hi,

I have a script that runs commands on all open tabs. To make sure that the user doesn't interfere, I lock all sessions at the beginning of the script and unlock them at the end.

However, when running the GetTab() function to cycle through the tabs, I get an error if the sessions are locked. I have found a workaround to unlock all sessions every time before running crt.GetTab(i) and relocking them afterwards but its a bit clunky. Is this a bug that we can't programmatically get a tab object if it is locked or desired behaviour? Once we have the tab object, we can programmatically interact with it without any problem so it sounds like a bug to me. Is there another way to reference tabs when they are locked? Thank you.

Running SecureCRT 8.3.2 on OS X.
Reply With Quote
  #2  
Old 05-17-2018, 10:02 AM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 434
Hi ngrison,

Scripts that are started before a session is locked will continue to run, but can only access their own session and any unlocked sessions. This means that a script that is running in one session cannot access a different tab that is locked.

I hope this helps clarify.
__________________
Thanks,
--Eric

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 05-17-2018, 10:23 AM
ngrison ngrison is offline
Registered User
 
Join Date: Aug 2017
Posts: 16
Thanks for explaining the behaviour Eric. I will continue to unlock the sessions every time I do a GetTab() then. Maybe it would be nice to add a feature in the future to allow GetTab() on locked sessions. Thanks for the prompt response.
Reply With Quote
  #4  
Old 05-17-2018, 10:39 AM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 434
Hi ngrison,

I'm glad I could help clarify. I have created a feature request to allow GetTab() to work when tabs are locked on your behalf. We will be sure to post here and let you know if this becomes available in a future version. If you would like to be notified directly please send an email to Support@VanDyke.com with "Feature Request Forum Post 13111" in the subject line.
__________________
Thanks,
--Eric

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
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 07:39 PM.