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-29-2019, 03:35 PM
ssetbob7 ssetbob7 is offline
Registered User
 
Join Date: May 2019
Posts: 6
Get Options?

Is there a list of objConfig.GetOption("xxxxx") options? Or maybe a printout of all options for a session? And are some not changeable, meaning read-only?

Thanks!
Reply With Quote
  #2  
Old 05-29-2019, 04:06 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 919
Quote:
Originally Posted by ssetbob7 View Post
Is there a list of objConfig.GetOption("xxxxx") options? Or maybe a printout of all options for a session? And are some not changeable, meaning read-only?
Option names are discovered by looking underneath the hood in the Sessions subfolder of SecureCRT's Configuration folder. Open the Default.ini file (but don't make any changes... you don't want to corrupt it) and you'll see the format as in...
Code:
.
.
.
S:"Hostname"=
S:"XAuthority File"=
S:"XServer Host"=127.0.0.1
D:"Enforce X11 Authentication"=00000001
D:"Request Shell"=00000001
S:"Keyboard Interactive Prompt"=ssword
D:"Disable Initial SFTP Extensions"=00000000
D:"Max Packet Size"=00001000
S:"Firewall Name"=None
S:"Sftp Tab Local Directory V2"=${VDS_USER_DATA_PATH}
S:"Output Transformer Name"=UTF-8
D:"Use Global ANSI Colors"=00000001
S:"Sftp Tab Remote Directory"=
S:"Username"=myusername
.
.
.
S: represents a string value -- name is in ""s.

D: represents a DWORD value -- name is in ""s. These are not only for numeric values, but also for:
  • true|false values (0=false/off; 1=true/on)
  • tri-state values (0=false/off; 1=true/on; 2=defer-to-global-option's-value), and
  • radio button values (0=top-most option; 1=next-option-after-that; 2=next-option-after-that, etc.).

B: represents a binary value. These cannot be set from within a script, nor can they be manually edited.

Z: represents a multi-line string value. For example "Description" sets the text of the "Description" field in Session Options.

Yes, there are some fields that cannot be changed.

What, specifically, are you looking to accomplish?

--Jake
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
Reply With Quote
  #3  
Old 05-29-2019, 04:35 PM
ssetbob7 ssetbob7 is offline
Registered User
 
Join Date: May 2019
Posts: 6
Trying to change the scroll buffer of a session is my current goal.
Reply With Quote
  #4  
Old 05-29-2019, 04:56 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 919
Quote:
Originally Posted by ssetbob7 View Post
Trying to change the scroll buffer of a session is my current goal.
You can change the size of the scrollback buffer.

Is this something you're looking to do on an one-time basis, or are you looking to make it large at times, smaller in other occasions, etc. ?

VBScript - Set current session's scrollback:
Code:
crt.Session.SetOption "Scrollback", 128000 'As large as it can be.

Python - Set current session's scrollback:
Code:
crt.Session.SetOption("Scrollback", 128000)
If you want it to be a specific value all the time for all connections (saved or ad hoc), you should consider editing the Default session to change it for all connections in one fell swoop -- never mind the scripting. You can employ the power of editing the Default session to make these changes to all of your existing and future sessions. Here are some links to a tip and a video that provide more details about using the Default session to make mass changes to multiple sessions:
https://www.vandyke.com/support/tips/defaultset.html
https://www.youtube.com/watch?v=5RbuZn9L48g
Note: In order for a "change" to be applied to all other sessions, the Default session's option/field you're targeting must actually be modified/different from its current value. This means that if the targeted field you want to apply to all other sessions is already set to the value you want, you must first change it to something different (and apply that "change") and then edit the Default session again to set the option to its desired value (and apply that "change").
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
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 08:01 AM.