[ACT-R-users] Perception and Motor
Dan Bothell
db30 at andrew.cmu.edu
Thu Jul 13 11:35:15 EDT 2006
--On Thursday, July 13, 2006 10:07 AM -0300 Fabio Gutiyama
<fgutiyama at gmail.com> wrote:
>
>
> That's interesting...
> But I noticed that ACT-R sends the mouse and keyboard actions to its
> experiment window, independently if an external application has the
> focus... (I'm using ACT-R 5)...
> Could you tell me how can I define the outs to reach external
> applications or where I can find information about this possibility?
>
There isn't really anything extra that's needed - all that is necessary
is that the device you install with pm-install-device be an ACL window.
The one note would be that if you have started the ACT-R environment,
then the ACT-R GUI tools (like open-exp-window) won't use the "raw" ACL
windows, but if you aren't using the environment you shouldn't
need to do anything different. Here's a function that implements about
the simplest ACT-R interface and model I could come up with that will
demonstrate this:
(defun press-a ()
(pm-reset)
(p test =manual-state> isa module-state modality free ==> +manual> isa
press-key key "a")
(pm-set-params :real-time t :needs-mouse nil)
(let ((win (if (and (boundp *env-windows*) *env-windows*)
(make-window (gensym "rpm-window") :device 'dialog)
(open-exp-window "test"))))
(pm-install-device win)
(pm-run 30)))
If you run that in ACL under Windows with ACT-R 5 (whether or not you
are using the ACT-R environment because it checks) the model will
press the key "a" repeatedly for 30 seconds and that will be sent to
whatever application has the focus (you should be able to pick
different apps with the mouse while it's running because the model
isn't controlling the mouse).
Dan
More information about the ACT-R-users
mailing list