Edward Pike on 2 Feb 2005 20:26:15 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] perl and mouses (a how do you do that ?)


i have a suggestion, but its not mouse-based.
google for "parsled", its a device for detecting
button connected to a serial port.  It will also
give you LED lights (some soldering required).
been using it, its great..seems to me your problem
can be solved by something like this.  there are
variants also with hooking up switches to parellel
port.  instead of number of clicks it will also
allow for 2 different actions depending on length
of button push.

epike

On Wed, 2005-02-02 at 14:40, George Gallen wrote:
> ok. here is a question for the perl xperts here...
> 
> I need to write a routine that scans the mouse, and writes to a file when either
>   the right or left mouse button is clicked, it needs to log, which button and the epoc.
>   that is all it's function will be. Looping waiting, logging.
> 
> The logging is no problem, getting the epoc is no problem.
> 
> I just don't know how to scan the mouse button? Which modules, what device, how
>   would I determine the button clicks?
> 
> Ultimately, I'm writing a second program that will run and it's actions will be determined
>    by the mouse clicks, but not in real-time, that's why they need to be logged.
> 
> The reason I chose the mouse, is I need a way to wire a momentary switch to the PC,
>    so, I'm going to hack a mouse, and put this switch in series with the mouse, doing
>    it this way gives me the benefit of having 2 switches for expansion of the project, and
>    already having the wiring, drivers done to read the switches, and the switches can be
>    hooked up USB.
> 
> Speaking of USB, what happens when two mice are hooked up to a USB, do both work?
>    or can I read from each one? hmmm.
> 
> George
> 
> George Gallen
> Senior Programmer/Analyst
> Accounting/Data Division
> ggallen@slackinc.com
> ph:856.848.1000 Ext 220
> 
> SLACK Incorporated - An innovative information, education and management company
> http://www.slackinc.com
> 
> ___________________________________________________________________________
> Philadelphia Linux Users Group         --        http://www.phillylinux.org
> Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
> General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug