programming.nbk: Home | Index | Next Page: Tour 7 | Previous Page: Tour 5


 Tour 6

This page is part of a tour of Notebook's features.

You can do magic!

Notebook is programmed in a language called Tcl. You can use the Tcl language in your pages to do magic. There are two kinds of magic: magic buttons and embedded macros. Both of them are represented on this page (you'll see them if you edit this page).

A magic button looks like a link, but it's colored magenta instead of blue. Whereas a link just takes you to the named page, a magic button executes a Notebook command. There are lots of magic buttons on this page; see what happens if you click them.

An embedded macro is a Notebook command that's executed whenever the page displays. It returns some text that's included into the page just as though you'd typed it. If you edit this page, then toward the top you'll see an embedded macro that looks like this:

Here, "helpbtn" is an embedded macro that creates a magic button that pops up the Help window with the named topic, as if you'd typed this:

	[%the Tcl language|showhelp "the Tcl language"%]

Of course, the macro is much shorter because it doesn't need to repeat the topic text. "showhelp" is a command that pops up Notebook's on-line help and makes it go to the specified topic.


programming.nbk: Home | Index | Next Page: Tour 7 | Previous Page: Tour 5


Notebook exported on Monday, 7 July 2008, 18:56:06 PM Eastern Daylight Time