VoodooPad Bookmarklets
VoodooPad 4.2.3 has support for running JavaScript and JSTalk bookmarklets. A bookmarklet is a specially formatted URL, which begins with either javascript: or jstalk: and then is followed by a script written in JavaScript (or JSTalk). Here is an example bookmarklet:
javascript:print("Hello World!");
Copy that text script and open up a page in VoodooPad. Select some text, and add your bookmarklet using the Format ▸ Add Link menu item. The text you have selected should then become a link. When you click on it, you will see a little window come up that looks similar to this:

Of course, your bookmarklets can be a lot more complicated than this. Since the bookmarklets are written using a variant of JavaScript called JSTalk, you can use it to open up a couple of applications:
javascript:
SBApplication.application("QuickTime Player").activate();
SBApplication.application("Safari").activate();
Do not forget to copy the first line, which starts with "javascript:", so VoodooPad knows what to do with the URL.
Here is an example that will print out all the names of the pages in your VoodooPad document:
javascript:
document = windowController.document();
var pageKeys = document.keys();
for (i = 0; i < pageKeys.count(); i++) {
var key = pageKeys[i];
var page = document.pageForKey_(key);
print(page.displayName());
}
As a shortcut to making bookmarklets, you can also paste your script into a VoodooPad page. Select it, and then choose the JSTalk ▸ Copy as JSTalk Bookmarklet menu item. Then paste and your link will be created automatically.
Pro Tip: You can turn use bookmarklets in the Edit ▸ Make Custom URL Link sheet. Make sure to use the JSTalk ▸ Copy as JSTalk Bookmarklet menu item first, so that the characters are escaped correctly.
Back to VoodooPad ▸ VoodooPadScripting

