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 04-05-2019, 02:17 AM
krypton179 krypton179 is offline
Registered User
 
Join Date: Apr 2019
Posts: 3
Variable Dialog Box (Secure CRT Mac - Python)

Hi Experts,

can somebody share a way that I can launch a dialog box when executing a python script on Secure CRT to request input of multiple variables that are used within the script?

One of the three variables is sensitive (password / key) so when executing user input it should not show up when typed.

Thanks,

K
Reply With Quote
  #2  
Old 04-05-2019, 08:33 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,027
Hi krypton179,

SecureCRT has its own mechanism for this.

See Scripting / Script Objects Reference / Dialog Object. The Prompt() method supports a Boolean (isPassword) that can mask that data entry.

Quote:
Python
Syntax
crt.Dialog.Prompt(message [, title [, default [, isPassword ]]])
Example
password = crt.Dialog.Prompt("Enter your password:", "Logon Script", "", True)

if password == "":
# User clicked Cancel button
else:
# User added data
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
Reply

Tags
mac , python , scripting


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 05:15 PM.