Created
December 29, 2019 04:55
-
-
Save jiyeonseo/895023ea4ac94ed64c9359bdd2fd76b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set srcFile to ((path to desktop) as text) & "dialog.txt" | |
set lns to paragraphs of (read file srcFile as «class utf8») | |
repeat with ln in lns | |
my stringToClipboard(ln) | |
tell application "KakaoTalk" to activate | |
tell application "System Events" | |
keystroke "v" using command down | |
key code 36 | |
delay 1.5 | |
end tell | |
end repeat | |
on stringToClipboard(t1) | |
do shell script "/usr/bin/python -c 'import sys;from AppKit import NSPasteboard, NSPasteboardTypeString; cb=NSPasteboard.generalPasteboard();cb.declareTypes_owner_([NSPasteboardTypeString], None);cb.setString_forType_(sys.argv[1].decode(\"utf8\"), NSPasteboardTypeString)' " & quoted form of t1 | |
end stringToClipboard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment