Proteopedia:DIY:Macros: Difference between revisions
m try separate buttons |
mNo edit summary |
||
Line 16: | Line 16: | ||
This example doesn't require any parameter to act. It causes the structure shown to 'bobble()'. | This example doesn't require any parameter to act. It causes the structure shown to 'bobble()'. | ||
<!-- | |||
<pre> | <pre> | ||
<jmol> | <jmol> | ||
Line 42: | Line 43: | ||
</jmol> | </jmol> | ||
'''Doesn't seem to stop!?!?''' | '''Doesn't seem to stop!?!?''' So what if a make separate buttons? That seems to work. | ||
--> | |||
<pre> | |||
<jmol> | |||
<jmolButton> | |||
<script>script /mc/ktheis.spt;bobble()</script> | |||
<text>Start Bobbling</text> | |||
</jmolButton> | |||
</jmol> <jmol> | |||
<jmolButton> | |||
<script>exit</script> | |||
<text>Stop Bobble</text> | |||
</jmolButton> | |||
</jmol> | |||
</pre> | |||
The <code><nowiki>bobble()</nowiki></code> button triggers the action. The other button uses <code><nowiki>exit</nowiki></code> to stop the looping bobble.</br> | |||
You can try the result here: | |||
<jmol> | <jmol> |