SOLVED Why is pbpaste not working?

Joined
Feb 19, 2012
Messages
14
Reaction score
0
i have a shell script in Automator run as a Service/quick Action
workflow receives current text in any application
Run Shell Script:
pbcopy
python -m webbrowser https://translate.google.com/?hl=en&tab=wT
sleep 3s
pbpaste

I highlight the text, run the service, pbcopy copies it to the clipboard, the python command opens Google Translate, the sleep command lets the web site fully load so I have a nice blinking cursor in the text box But it won't paste automatically. I have to manually do it through the Paste menu item.or command-v. Any ideas?
 
Using applescript:

Code:
tell application "System Events"


    keystroke "v" using command down


end tell
 
OK, thanks Lufbra. if i get an answer there I'll come back here and mark this thread totally solved!
 
went to mac scipter. they suggested that pbpaste does not work because it only goes to standard output. So I will Mark this solved: instead of using pbpaste run a little applescripy that Lufbra provided me with and it all works fine as an Automator quick action
 
Back
Top