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 03-19-2021, 01:14 AM
FabriceCarboni FabriceCarboni is offline
Registered User
 
Join Date: Feb 2021
Location: Belgium
Posts: 10
how can I get the prompt??

Hello, I have created a python script that allows me to automatically create a banner on my switch depending on the prompt, so I use the command "crt.Screen.Get(45,1,45,32)" 45,1 and 45,32 are the rows and columns when I can find the prompt of the switch but I have a problem whith that.
These values depend on the size of my screen. If I use my CRT on my laptop in 13inch these values are no longer true, because my screen is smaller and so my prompt is lower.
how can I get my text back without having to base myself on the line number and column.
Thanks for your help.
Reply With Quote
  #2  
Old 03-19-2021, 08:15 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,635
Hi FabriceCarboni,

You would probably want to use the CurrentColumn and CurrentRow properties available to the Screen Object. See SecureCRT Help topic Scripting / Script Objects Reference / Screen Object for more info.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 03-21-2021, 04:12 AM
FabriceCarboni FabriceCarboni is offline
Registered User
 
Join Date: Feb 2021
Location: Belgium
Posts: 10
Thumbs up

Perfect it works I used tese 2 commands and the command text.partition(",") to grab the text until this char.
Thx for your help.
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 03:32 AM.