In case it helps, this is the way I've implemented a "type a password using the 1P CLI" macro.
For more information, see the wiki Searching the Forum for Answers section.