Test my script
Connect scripts and parts to add functionConnect scripts and parts to add functionNo tip for this topicNo example for this topicTest my script and connectionsTest my script and connections
You can run (and test) some scripts before you connect them to parts. The script displayMessage in the example is one that you can run independently of the visual part.
You can run the script from the Script Editor or the System Transcript window.
Running the script from the Script Editor  
To run the script from the Script Editor:
1. Using your mouse, highlight the script's temporary variables and code. Don't highlight the script name. Thus, for the script displayMessage, highlight
| messageBox |
messageBox := (CwMessagePrompter new)
title: 'Hey!';
messageString: 'Please do not press that button again.'.
messageBox prompt.
2. Pop up the menu for the script pane. (Click mouse button 2 or 3 on the lower pane.)
3. Select Execute from the pop-up menu.
 
Running the script from the System Transcript  
To run the code from the System Transcript:
1. Type in the System Transcript:
2. <part name> new displayMessage
a. For <part name>, supply the name of the part (or class) that contains displayMessage.
3. Highlight the expression.
4. Select Execute from the Edit menu.
The code runs and displays a message box, which you can close by selecting OK or Cancel.
Last modified date: 08/09/2019