Advertisement
here2share

# copy2clipboard ZZZ

May 10th, 2016
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # copy2clipboard ZZZ
  2. import appuifw, e32
  3.  
  4. try:
  5.     import clipboard # ??? ... execfile('E:\resource\clipboard.pyc', global())
  6. except: pass
  7.  
  8. body = appuifw.Text()
  9. appuifw.app.screen = 'normal'
  10. appuifw.app.body = body
  11. body.font=("annotation",30)
  12. body.color = 255,0,0
  13. body.style = appuifw.STYLE_BOLD
  14. appuifw.app.body.set(u'')
  15. def copy():
  16.     text = appuifw.app.body.get()
  17.     print 123, text
  18.     try:
  19.         clipboard.set(text)
  20.         appuifw.note(u'Successfully Copied To Clipboard!', 'conf')
  21.     except:
  22.         appuifw.note(u'sorry, the attempt has failed to import'.title(), 'error')
  23. appuifw.app.menu = [(u'Clipboard', copy)]
  24.  
  25. def quit():
  26.     app_lock.signal()
  27. app_lock = e32.Ao_lock()
  28. appuifw.app.exit_key_handler = quit
  29.  
  30. app_lock.wait()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement