Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'well, since we're having fun with Stickies...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
well, since we're having fun with Stickies...
Authored by: tedw on May 31, '09 06:42:17PM
following up on u2mr2os2's post, if you're willing to do a little editing you can make this work. do the following:
  1. copy the Stickies widget from /Library/Widgets to ~/Library/Widgets, and rename the copy StickiesPlus
  2. go to Dashboard, and use the Manage Widgets tool to disable the original Stickies widget (unchecking it is sufficient)
  3. right- or control-click on the new StickiesPlus widget and select Show Package Contents from the contextual menu
  4. open the Info.plist file in a plain-text editor (or in Property List Editor if you have Dev Tools installed) and make the following edits:
    • change the Bundle Identifier, Bundle Name, and Bundle Display Name keys (CFBundleIdentifier, CFBundleName, CFBundleDisplayName) to say StickiesPlus rather than Stickies
    • add a boolean key called AllowSystem and set it to true
  5. back in the package contents folder, open the file Stickies.js, and add the code below in the javascript function loadPreferences() right after the line of code that says var data = preferenceForKey(kDataKey);.
add this code snippet:
 	 if (data=="") {
		var data = widget.system("/usr/bin/pbpaste -Prefer rtf", null).outputString
it will look like this, when you're done:
function loadPreferences() {
	var data = preferenceForKey(kDataKey);
	if (data=="") {
		var data = widget.system("/usr/bin/pbpaste -Prefer rtf", null).outputString
	mydiv.innerHTML = data;
Make sure the changes you make in the files are saved, and (may or may not be necessary, but can't hurt) kill the dock and let it restart. now every time you double-click on the StickiesPlus icon it will make a new sticky in dashboard with the contents of the clipboard. you could even make an applescript like so:
tell application "System Events"
	set frontProc to item 1 of (every process whose visible is true and frontmost is true)
	tell frontProc
		keystroke "c" using command down
	end tell
end tell

set widgetPath to (path to library folder from user domain as text) & "Widgets:StickiesPlus.wdgt"
tell application "Finder"
	open widgetPath
end tell
You can run that script from the script menu (or quicksilver, or etc) to automatically copy the selection in the foreground app and load it into a dashboard sticky. I think it will only work for text - possible limitation of pbpaste - but I haven't really tested it much.

[ Reply to This | # ]