sbcl --script でやるなら
昨日の Common Lisp から Skype を使う を sbcl —script でやるならこんな感じかな。
(load "~/quicklisp/setup.lisp")
(let* ((*standard-output* (make-broadcast-stream))
(*error-output* *standard-output*))
(ql:quickload :dbus))
(use-package :dbus)
(with-open-bus (bus (session-server-addresses))
(with-introspected-object (skype
bus
"/com/Skype"
"com.Skype.API")
(flet ((skype (command)
(skype "com.Skype.API" "Invoke" command)))
(skype "NAME FromCommonLisp")
(skype "PROTOCOL 8")
;; #xxx... はチャットルームの ID
(skype (format nil "CHATMESSAGE #xxxxxxx/$yyyyyyy;9999aaaa9999 ~a"
(second sb-ext:*posix-argv*))))))
sbcl --script skype.lisp "hello"
0 件のコメント:
コメントを投稿