|
#1
|
|||
|
|||
Launching to Web Interfaces
Trying to make my job a bit faster. When I open a command line of the device I want to open the Website interface of it as well. Here is what I have now. I'm not sure what I'm missing.
Also I want to have one script and just change the arguments within the properties of the devices to the specific IP. # $language = "VBScript" # $interface = "1.0" ' Run.vbs demonstrates how to utilize the Windows Scripting Host (WSH) by using ' its 'Run' method to execute other programs. Note the use of nested quotes to pass ' a path that contains spaces along with command line arguments. Sub Main Dim shell Dim IP Set shell = CreateObject("WScript.Shell") shell.Run """C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"" https://&IP&:4434" End Sub |
#2
|
|||
|
|||
Hi GuitarDude,
You can get the IP address of the connected session using the RemoteAddress property of the Session object from SecureCRT's scripting API. For Example: Code:
# $language = "VBScript" # $interface = "1.0" strRemoteAddress = crt.Session.RemoteAddress Set shell = CreateObject("WScript.Shell") shell.Run("http://" & strRemoteAddress) For more information about SecureCRT's scripting API please refer to the Help.
__________________
Thanks, --Brittney VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
![]() Quote:
This does work for me. Thanks for the help. I did change a few things like https and adding the port number. |
#4
|
|||
|
|||
Hi GuitarDude,
Great! I am glad to hear that you are all set! My apologies for failing to include the port number in the example! Do you run the script every time that you connect to a session? If so, you can configure a logon script to run the script as soon as you connect in Options > Session Options > Connection > Logon Actions. Simply point to the script in the "Login Script" field. If you do not wish to run the script every time that you connect, you can map a button on your Button Bar to run the script as you please. For more information please refer to our YouTube video: https://youtu.be/qp82UWxGB8I
__________________
Thanks, --Brittney VanDyke Software Technical Support support@vandyke.com (505) 332-5730 Last edited by berdmann; 03-11-2019 at 12:08 PM. |
#5
|
|||
|
|||
Web Interface Script
Looking into the button bar a little I just thought of another helpful button. It would be pinging the current session. What is the shell run for that.
|
#6
|
|||
|
|||
Hi GuitarDude,
Correct me if I am mistaken, but it sounds like you are trying to ping the remote that you are connected to. Is that correct? Can you tell me more about the problem that you are trying to solve or the goal that you have as it relates to pinging the "current session"?
__________________
Thanks, --Brittney VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Tags |
scripts , website |
Thread Tools | |
Display Modes | Rate This Thread |
|
|