DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Scrambled Facebook Emotes Into Clipboard(windows, Requires Pywin32)

01.04.2011
| 2870 views |
  • submit to reddit
        // Scrambles all known Facebook emoticons and places the text in your Windows(eww) clipboard.

import win32clipboard, random

emotes = ['8-)', '>:o', '-_-', '8-|', ':-)', ':-D', '>:-(', ':-D', ':-(', ';-)', ':-p', '<3', ':v', ":'(", ':3', ':-o', ':|]', ':/', ':putnam:', ':-*', '(^^^)', '3:)', '<(")', 'O:)', ':42:', '^_^', 'O.o']

random.shuffle(emotes)
emotes.append(' ')
string = ' '.join(emotes)

win32clipboard.OpenClipboard()
win32clipboard.EmptyClipboard()
win32clipboard.SetClipboardText(string)
win32clipboard.CloseClipboard()