Applescript to copy in app A and paste in app B without leaving app A?
Hi, I'm a completly begginer in Automator and AppleScript.
Somehow I've managed to do this wonky service to copy selected text on app A, convert it to plain text, paste on app B and jump back to app A.
However, the process of going from an app to the other and then back is very, very distracting, a total anoyance when I'm busy reading a text (I use all apps in full screen with spaces, so you can guess how annoying it is).
I don't even know whether that is possible, but could anyone help me to make the same thing, without ever leaving the app A (which must be on full screen)? Or at least make it look better, maybe?
Here is the AppleScript:
on run {input, parameters}
tell application "System Events"
keystroke "c" using command down
do shell script "pbpaste | pbcopy"
end tell
delay 0.2
tell application "AppB" to activate
tell application "System Events"
tell process "AppB"
keystroke "v" using command down
end tell
end tell
delay 0.5
tell application "System Events"
tell process "Finder"
activate
keystroke tab using command down
end tell
end tell
return input
end run
Thank you
MacBook Pro (13-inch Mid 2009), OS X Mountain Lion (10.8.5)