How can I make a "copy to clipboard" button in a dashboard widget?
An example: http://www.youtube.com/watch?v=NfdgGFrrmIQ
How can I make a "copy to clipboard" button in a dashboard widget?
An example: http://www.youtube.com/watch?v=NfdgGFrrmIQ
You can use the widget.system
method.
Example: widget.system("/bin/echo '"+password+"' | /usr/bin/pbcopy", null);
For this to work, under Widget Attributes, you must enable Command Line Access (Checkbox "Allow Command Line Access"
Source: http://andrew.hedges.name/widgets/dev/ under 'System Access'