Place text in clipboard - Widget

Discussion in 'Mac Programming' started by Winglet80, Apr 20, 2010.

  1. Winglet80 macrumors newbie

    Joined:
    Apr 20, 2010
    #1
    Hi! I'm fairly new to creating widgets but I'm making one with Dashcode and I have a piece of text that is generated within the program that I want to place in the macs clipboard. How do I go about with that? I have spent hours searching the web.

    Thanks!
    /Fred
     
  2. Winglet80 thread starter macrumors newbie

    Joined:
    Apr 20, 2010
    #2
    Got an answer that worked.

    widget.system("/bin/echo 'my text' | /usr/bin/pbcopy", null);
     

Share This Page