[Squeakland] How to script "return to previous project"

Scott Wallace scott.wallace at squeakland.org
Fri Mar 18 04:04:22 PST 2005


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: %MeanderThenExit.004.pr
Type: application/applefile
Size: 132 bytes
Desc: not available
Url : http://squeakland.org/pipermail/squeakland/attachments/20050318/fea20a41/MeanderThenExit.004-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MeanderThenExit.004.pr
Type: application/octet-stream
Size: 86389 bytes
Desc: not available
Url : http://squeakland.org/pipermail/squeakland/attachments/20050318/fea20a41/MeanderThenExit.004-0001.obj


More information about the Squeakland mailing list