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 06-15-2010, 07:57 PM
kalin35 kalin35 is offline
Registered User
 
Join Date: Jun 2010
Posts: 2
Hostname and Username

Is there a method or anyway to get the hostname and or the username of the current tab? I know this information is saved in the session configuration.

Thanks
Reply With Quote
  #2  
Old 06-16-2010, 07:46 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi kalin35,

Thanks for your question.

It is possible to get the information you have requested. There are several threads in the forums that discuss this question.

For your convenience, here is an example script that would allow you to get the information you want:
Code:
MsgBox crt.Session.Config.GetOption("Hostname")
MsgBox crt.Session.Config.GetOption("Username")
You can find more information about the SessionConfiguration object in the ActiveX Scripting / Script Objects Reference chapter in the help file included in SecureCRT.

Does this help to answer your question?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 06-16-2010, 01:28 PM
kalin35 kalin35 is offline
Registered User
 
Join Date: Jun 2010
Posts: 2
Thank you very much. That is exactly what I wanted. Where is that documented at? Is there a place where I can see all available methods and objects? This is the only document that I've found: (http://www.vandyke.com/support/tips/...essentials.pdf ) but I don't see anything in there.


I have on last thing that I'm trying to accomplish. For the current tab, how would I make a hotkey/script to prompt the "Port Forwarding Session Option"? I know you can create a menu to prompt the session options, but I want it to go the port forwarding tab. I have to create ssh tunnels on a routine basias.

Thanks again for the help!!!
Reply With Quote
  #4  
Old 06-16-2010, 03:35 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi kalin35,

Thanks for the update. I am glad I could help answer your question. You can find the SecureCRT API documentation in the help files under the ActiveX Scripting / Script Objects Reference chapter.

It is not currently possible to set a port forward via a script.

I have added this forum thread to our SecureCRT development database. Should a future release of SecureCRT have the ability to set a port forward via a script, we will post to this forum thread.

If you would like to be notified directly, please complete and submit the form at the following location:
Submit Feature Request
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #5  
Old 08-25-2010, 03:21 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,634
The ability to use "SetOption" to modify the Port Forward Table has been fixed in a later build of SecureCRT. Any users who would like to receive this build, please send an e-mail to support@vandyke.com and reference "Attn Brenda - Forum Thread #5722" in the subject.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
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:50 AM.