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 08-17-2020, 03:58 AM
AlexG AlexG is offline
Registered User
 
Join Date: Jan 2020
Posts: 5
WaitForString in multiple sessions

Hello,
Need help please.
In my Python script I have to open a few sessions (tabs) simultaneously and observe processes in each, one may affect another.
And I have to catch some information in every session at the same time.
Is there any option to do at the same time in a few sessions opened from the same script things like WaitForString(s), ReadString ? Each session has its own log and therefore result of findings could be logged there.

Thanks
Alex

Last edited by AlexG; 08-17-2020 at 04:14 AM.
Reply With Quote
  #2  
Old 08-17-2020, 08:59 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,635
Hi AlexG,

At the exact same time is not possible but it's probably possible to "simulate that" (sort of a pseudo parallel).

Certainly with a for loop, you can iterate over the tabs, sending commands and getting results:
Code:
    while True:
        # Iterate through all tabs
        for i in range(1, crt.GetTabCount() + 1):
            objTab = crt.GetTab(i)
            # Do Work Here
However, I need more info as to what you are trying to accomplish. Please elaborate.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 08-17-2020, 11:59 PM
AlexG AlexG is offline
Registered User
 
Join Date: Jan 2020
Posts: 5
Hi Brenda,

Thank you for quick reply.
I'll clarify.
I initiate action in one session (tab) and expect reactions in original one and in 1 or 2 more.
I have to verify that there were no any unexpected messages / failures in all tabs during above mentioned action. I think, that if I go one by one I will miss expected messages / events which already occurred.
Do you have any suggestions?

Thank you
Alex
Reply With Quote
  #4  
Old 08-18-2020, 07:20 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,635
Hi Alex,

I do not know of a way you could do that presently.

I have added this thread to a feature request in our product enhancement database to add the ability to run multiple scripts in succession (same tab, call one script from another). Should a future release of SecureCRT include this feature, notification will be posted here.

If you prefer direct email notification, send an email to support@vandyke.com and include Feature Request - Forum Thread #14261 in the subject line or use this form from the support page of our website.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #5  
Old 08-19-2020, 01:20 AM
AlexG AlexG is offline
Registered User
 
Join Date: Jan 2020
Posts: 5
Thank you, Brenda
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 01:15 AM.