Recently a colleague asked how one might write a script whose action would be to take the user back to the previous project -- i.e. to the project from whence the user had come before she entered this project.
Attached is a project that illustrates one way to do this. Run the script by clicking the yellow !, and the star will meander around the screen for a while, and eventually automatically you'll be whisked back to the project you were in before you loaded this project.
The trick is to find a *button* or *menu item* that does what you want to write a script to do. You can then use the "fire" tile phrase (look in the "miscellaneous" category of the Viewer) to instruct the button or menu item to behave as it had been pressed manually.
In this example, you'll see that the programmatic "return to previous project" is accomplished by telling the "< PREV" button in the golden Navigator bar to "fire", in the last line of the script.
Cheers,
-- Scott
squeakland@lists.squeakfoundation.org