
I was automating password entry for an application using shortcuts,
First used shortcut action,
Open application_name
then wrote AppleScript,
on run
tell application "System Events"
keystroke {return}
delay 2
keystroke "password"
delay 2
keystroke {return}
end tell
end run
but it gives me authentication failed.
And when I type the same password manually, then authentication succeeds, is there an alternative to using keystroke?