I know it is possible to send a variable from a Parent to the Child script using the [execute "scriptname.was" SHARED] command, but is it possible to have a string variable pass from the child back to the parent??? Basically what is happening is I use one address, username and password to get a list of different MTSO's that I use.... I then select one of the MTSO's from the list. I have created a script that contains the username and password info. Then I have another that selects the individual switch. The reason I dont have them combined is per I change my password frequently, and I don't want to update every single switch script. I have a working script setup right now, but it is very slow.... I believe this would speed it up. Below is what I believe would be the logical format for the script, but it doesn't work...
;this is the "switch" portion of the script
proc main
string pswd,usrnm
waitfor "Login:"
execute "pw_test.was" SHARED
transmit usrnm
transmit "^J^M"
waitfor "Password:"
transmit pswd
transmit "^J^M"
when QUIET 4 call relogin
transmit "5^J^M"
pwtitlebar "NAME OF SWITCH" PERMANENT
when CLEAR
waitfor ">"
waitfor ">"
waitfor ">"
endproc
proc relogin
HANGUP
DIAL TELNET "Appropriate Connection"
call main
halt
endproc
;this is the pw_test.was file
proc main
string usrnm = "myusername"
string pswd = "mypassword"
pwtitlebar "Logging in..." PERMANENT
endproc
....I would like to get this to work... If I cant do it this way, can I do a file query and just have the username and password in that file, or 2 separate files.... I think that would take longer though, and i dont want to have that file open while it is loading the info...
;this is the "switch" portion of the script
proc main
string pswd,usrnm
waitfor "Login:"
execute "pw_test.was" SHARED
transmit usrnm
transmit "^J^M"
waitfor "Password:"
transmit pswd
transmit "^J^M"
when QUIET 4 call relogin
transmit "5^J^M"
pwtitlebar "NAME OF SWITCH" PERMANENT
when CLEAR
waitfor ">"
waitfor ">"
waitfor ">"
endproc
proc relogin
HANGUP
DIAL TELNET "Appropriate Connection"
call main
halt
endproc
;this is the pw_test.was file
proc main
string usrnm = "myusername"
string pswd = "mypassword"
pwtitlebar "Logging in..." PERMANENT
endproc
....I would like to get this to work... If I cant do it this way, can I do a file query and just have the username and password in that file, or 2 separate files.... I think that would take longer though, and i dont want to have that file open while it is loading the info...