Mar 9, 2017

just paste my text!

It's very annoying when sites/applications block copy-paste out of some idiotic conclusion that it improves system security. Here is a novel idea - make it a configuration option.
In a mean time here is a script that I've adopted from https://github.com/EugeneDae/Force-Paste
I've added delay that allows me to switch between applications to Copy and then later Paste.

Enjoy.

set numbers_key_codes to {82, 83, 84, 85, 86, 87, 88, 89, 91, 92}
display dialog "copy stuff now, and switch to the fucking rdp after closing the message"
set input to do shell script "pbpaste"
delay 3
if (input is not missing value) then
tell application "System Events"
repeat with char in the characters of input
try
key code numbers_key_codes's item (char + 1)
on error
keystroke char
end try
end repeat
end tell
end if
view raw fuckingpaste hosted with ❤ by GitHub

No comments: