# $language = "VBScript" # $interface = "1.0" ' ActivateTab.vbs Sub Main() ' Prompt user for session paths to be used for connecting in tabs: szSession1 = crt.Dialog.Prompt("Enter session 1:", "", "", False) if szSession1 = "" then exit sub szSession2 = crt.Dialog.Prompt("Enter session 2:", "", "", False) if szSession2 = "" then exit sub szSession3 = crt.Dialog.Prompt("Enter session 3:", "", "", False) if szSession3 = "" then exit sub ' Get references to the tab objects for later use: Set objTab1 = crt.Session.ConnectInTab("/S " & szSession1) Set objTab2 = crt.Session.ConnectInTab("/S " & szSession2) Set objTab3 = crt.Session.ConnectInTab("/S " & szSession3) ' Cycle through activation of each tab, waiting one second in between each ' activation: objTab1.Activate crt.Sleep 1000 objTab2.Activate crt.Sleep 1000 objTab3.Activate crt.Sleep 1000 End Sub