Page 6: Using Script Files with Embedded Buttons

[Home] [Page 1] [Page 2] [Page 3] [Page 4] [Page 5] [Page 6] [Page 7]


Script Files

Rasmol script commands listed in the script attribute.

This push button turns on a spacefill model for the substrate and colors it according to atom type (cpk). It also resets the orietation of the model to that used on Page 2. It changes the protein representation to strands and colors it white.

Rasmol script commands placed in a separate text file named "scriptA.spt" and sent to a Chime by adding the script='script Page6_Media/scriptA.spt' attribute to the embedded button.

This push button turns on a spacefill model for the substrate and colors it according to atom type (cpk). It also resets the orietation of the model to that used on Page 2. It changes the protein representation to cartoon and colors it according to secondary structure.

This toggle button turns on and off the spinning.



      1. Place the Rasmol script commands in a plain text file. Each command is placed on a separate line, without semicolons. GoLive has a simple text editor that can be used for this purpose; it is opened by selecting File>New Special>Text Document from the File menu.
      2. The script file that was used for the second button in the above table is shown below:
      3. After creating the script file save it to a location within your site folder. In the above case the file was saved within the Page6_Media folder, which is within the Pages folder. The name that was given to this file is scriptA.spt. The file extension ".spt" should be used when naming script files. Below is a picture of the site management window which shows the location of this file within the site. Double-clicking on the script file in the site manager window will open it for editing in the text editor.
      4. To load this script file, the second button in the table below uses the script attribute having the value script 'Page6_Media/scriptA.spt'. This done by selecting the button and then selecting the Attrib tab in the Inspector palette:

[Home] [Page 1] [Page 2] [Page 3] [Page 4] [Page 5] [Page 6] [Page 7]