summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--starling/node.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/starling/node.scm b/starling/node.scm
index d3dc129..b21d5c6 100644
--- a/starling/node.scm
+++ b/starling/node.scm
@@ -48,6 +48,8 @@
&
attach-to
detach
+ run-script
+ stop-scripts
blink))
(define-class <node> ()
@@ -220,9 +222,15 @@ represented as a ratio in the range [0, 1]."
;;;
-;;; Simple Script Actions
+;;; Scripting
;;;
+(define-syntax-rule (run-script node body ...)
+ (with-agenda (agenda node) (script body ...)))
+
+(define-method (stop-scripts node)
+ (with-agenda (agenda node) (clear-agenda)))
+
(define-method (blink (node <node>) times interval)
(let ((orig (visible? node)))
(let loop ((i 0))