Friday, July 20, 2018

#1 2003-04-22 01:36:12 pm

Registered: 2003-04-16
Posts: 11

user/password to shell script from interface

first i want to say thanks to everyone who helped me out with my original applescript. it works nicely.

now though, i started looking at applescript studio and thinking wow, how neat would it be to have a nice little window where i could enter the username and password and then click a button to execute the script and plug in the username and password where needed. i've looked at the studio documentation, but i find it confusing--i'm not really a programmer...just a guy messing around with this stuff.

anyway, the script is just a simple ssh connection that sends the password in plaintext like so:


tell application "Terminal"
       do script with command "ssh"
       delay 10
       tell application "Terminal"
           do script "mypassword" in window 1
       end tell
end tell

i know there is a way to get "myusername" and "mypassword" to use information entered through an interface but i can't figure out how to do it. the only clue i have so far is that variables look something like % mypassword % ? the studio tutorials helped a little but none of them do this particular thing and i seem to be too thick to figure it out...
any help is sincerely appreciated.

Filed under: terminal



Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)