AppleScript and shell script issue I used to run a shell command with AppleScript for authentication to a radius server, this was running fine as I could specify a parameter for the password.
the shell process was updated and don't accept the password parameter anymore and have to be done separately (prompted by terminal), so in terminal its look like it
~mycommand authenticate -username 
~password

unless I'm wrong &quot;do shell script&quot;m run in different instance so it's no point doing
do shell script + auth command
do shell script + password

is they anyway I can still use AppleScript and somehow let AppleScript answer with the password?
The following example AppleScript code shows an example of how it could be coded for iTerm2.
set myPassword to text returned of ¬
    (display dialog &quot;Enter Password:&quot; default answer &quot;&quot; with hidden answer)

tell application &quot;iTerm&quot;
    set myWindow to (create window with default profile)
    tell myWindow to tell the current session
        write text &quot;echo mycommand authenticate -username&quot;
        delay 1
        write text &quot;echo &quot; &amp; myPassword
        delay 1
    end tell
    close myWindow
end tell


Notes:
As coded, it uses echo just for testing purposes, obviously you'd remove echo and &quot;echo &quot; &amp;  for production run.
The delay commands may need to be adjusted, or may not be necessary at all.  Test with the actual commands to see.