Jump to content

Help with command/lisp reactor


ziele_o2k

Recommended Posts

Hi,

 

I'm starting my adventure with reactors and first thing I would to have is reactor for making lisp/command usage statistics.

 

Here is my code

;pz:statistics:reactor - function to update statistics file
(foreach grp (vlr-reactors :vlr-command-reactor :vlr-lisp-reactor)
 (foreach obj (cdr grp)
   (if (= "statistics" (vlr-data obj))
     (vlr-remove obj)
   )
 )
)
(vlr-command-reactor "statistics"
'(
   (:vlr-lispwillstart . pz:statistics:reactor)
 )
)
(vlr-lisp-reactor "statistics"
'(
   (:vlr-lispwillstart . pz:statistics:reactor)
 )
)

 

I have one problem, if in lisp someone is using

(command ...)

then my function will add in statistics file one use of lisp and any (command) from this lisp.

Is there any way to avoid this situation?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...