VanDyke Software Forums

VanDyke Software Forums (
-   Scripting (
-   -   how can I get the prompt?? (

FabriceCarboni 03-19-2021 01:14 AM

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.

bgagnon 03-19-2021 08:15 AM

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.

FabriceCarboni 03-21-2021 04:12 AM

Perfect it works I used tese 2 commands and the command text.partition(",") to grab the text until this char.
Thx for your help.:)

All times are GMT -6. The time now is 04:55 PM.