Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 21
  1. #1
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,961

    Lightbulb Example: Get the Color under the Mouse Pointer

    This sample project shows how to get the color underneath the mouse pointer. The values are returned in either Long or Hex.
    Attached Files

  2. #2
    Join Date
    Aug 2004
    Posts
    1
    thnx please explain that howcan i do that example, and how i can use this example in my applaction

  3. #3
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,961
    All the code is in the Page's On Timer Event. It's very straight forward and you should be able to figure it out from there. You'd probably want to use it in conjunction with the mouse.dll I posted to detect when the user clicks the left mouse button so you know what color is actually being picked.



    Quote Originally Posted by mke0075
    thnx please explain that howcan i do that example, and how i can use this example in my applaction

  4. #4
    Join Date
    Aug 2004
    Location
    Gent, Belgium
    Posts
    74

    Smile

    Hi,

    I am still a bit thinkering around my reaction time application. The problem is that capturing keybord events adds about 40-50 msec to the registred reaction time wich is not really acceptable. Special purpose keypads use a microcontroller timer and intelligent protocols and bring down the variance to 1 msec precision wich is of course excellent (even slightly overkill) but are very expensive. It seems that mouseclicks or gamepads only add about 4-5 msec. Is anybody aware if this statement is true ? As I would like to use this program for evalution of driving capacity (time to hit the brake on visual and acoustical warning signal) I am wondering if I could use the same game devices I see some guys use in these (fanbtastic :-) games like microsoft wheel and pedals devices. problem : how to call these from ams pro ?,

    Sincerely,

    Georges

  5. #5
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,056
    Georges,
    Iím with you in wishing for a way to capture feedback from joysticks, etc.

    On a slightly different note, Iím a bit curious about the this keyboard latency issue. I might be wrong here, but I think that the 40-50 msec comes not from the speed of the physical switches on the keyboard, but rather the amount of time it takes to run the code necessary to process the data.

    If this is indeed the case, I donít understand how a gamepad would reduce this latency to 4 Ė 5 msec. Wouldnít the amount of latency be more closely tied to the amount of code (logic) needed to process or capture the button click?

    If my assumptions are true, I canít see where we can come up with the 4-5 msec numbers. I mean, we donít have the code necessary to capture button clicks on a gamepad. Will the code be three lines long, or thee thousand lines long?

    Iím truly not trying to give you a bad time here. Iím not smart enough to provide the code to use gamepads, so Iím trying to think of an alternate method.

    You mention that using a keyboard results in 40 Ė 50 msec of latency. I wonder if it would be possible for an end user to calibrate his particular machine.

    For instance, before a user takes the test, they must go through calibration. Calibration might consist of a count down timer. The timer (in big bold numbers) starts at 10, then counts down to 0 at even 1 second intervals. The user tries to click the space bar at the exact instant that the clock reaches 0. I wonder if the user was to take this calibration test say three times, and the latency was measured and averaged between the three times, if it might not allow you to figure that particular machinesí latency.

    After you calibrate the latency, subtract that number from the test answers.

    Sorry I canít give you the answer you are looking for.

  6. #6
    Join Date
    Aug 2004
    Location
    Gent, Belgium
    Posts
    74

    Smile

    Dear Jim,

    Thanks for the good ideas and Your input on discussing this . I am not at all an expert myself on this topic but managed to find some bits and pieces of documentation. The 40-50 msec delay seems to have to do with the fenomenon of "bouncing" key's and this is specific to the way keys on a keyboard are constructed (spring mechanism) and operate. Once captured and stored in a buffer these values have to be stored in registry, catched by layers of windows buffers and functions before they "enter" in the e_keyevent variable where they are then available for our programs and action scripts. This last part of the traject is indeed the same for mouse clicks and gamepad triggers but the previous part seems to be quite diferent ( I do not have details on this but am looking further into it). The procedure that You are proposing is already a (compex) reaction time measurement paradigm in itself as anticipation enters in te setup. Indeed a user will anticipate the time necessary for going fron the last "1" to the "zero" number wich triggers his reaction. But it is indeed generally a good idea that has been incorporated at machine level by the microcontrollers I was mentioning (expensive 1 msec accuracy systems). They have low level calibration routines where they send a byte to the hostPC that has to send it back. That allows to calculate and compensate for any host specific "low level" delay's (nice trick). Following Your suggestion a "higher level" calibration procedure could take advantage of the page.timer and on page.time event automatically trigger the reaction start event and calculate mean and standard deviation of the delay. Thanks for the feed back. Discussing this sparkles idea's.

    PS I just subscribed to the developer section of Logitech in order to get their developers kit wich hopefully can make the proces of interfacing their devices a bit more friendly.

    Anyhow I will keep the forum posted.

    Cheerio,

    PS

    This link: http://www.cedrus.com/lumina/index.htm

    contains input from Cedrus the professionale respons pad controller. On their site You will find explanations on the protocols and C routines to operate on it.


    Sincerely,

    Georges

  7. #7
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,056
    Georges,
    Thanks for the explanation. I understand a bit better now. It surprises me that the additional latency is in fact from the keyboards, and the way Windows ô handles them. I learn something new everyday.

    Iím most happy if any of my comments spark any additional thoughts for you. Please do keep us posted on what you find out. I think being able to add gamepads and/or joysticks to our projects would be cool. Itís a add-on or plug-in that Iíd pay for. Of course, any use that Iíd have for a joystick, would seem rather bohemian next to what you are building.

  8. #8
    Join Date
    Aug 2004
    Location
    Gent, Belgium
    Posts
    74
    Hi Jim,

    I like bohemians especially in rhapsodisiatic tunes...

    Seriously, I really admire and respect the game engines and gaming software. If I see what "anemic GUI" our psychologist offer to patients in contrast to richness and interactivity levels of modern games I feel well... a bit ashamed. Most of the systems we use in our neurocognitive labs are rather "flat" compared to modern distributed gaming. When one observes the interactive action and complexity that kids handle in SOF or other action games in LAN parties one cannot but admire the technology and engineering "tour de forvce" behind all this. Of course there are more customers (and more money involved) in gaming then in health providing services but then again with a bit more fantasy from the part of our governemental organisations (unless government and fanasy are boolean false) we should be able to work up to that level. Unfortunately this is far from being the case today. Of course there are growing initiatives (fi in the field of virtual reality and simulation software) but at the level of the individual phycician or therapist this is still very expensive and really out of reach. Lured by some racing games I have been looking into these gaming engines in order to create a driving simulator not only for evaluation of driving ability but especially to provide older people with meaningfull and risk free training. There was once an ATARI system like that. Now oblivious. Only some compagnies offer script driven engines (as far as I know) There are some commercial initiatives (fi STISIM-- very good BTW) http://www.systemstech.com/stidrsm1.htm
    on the market but they are all to expensive for me.

    Therefore I will try to use AMS5.0 Pro to construct a "poor mans drive simulator" (positive side effects: it keeps us young and brain-awake!!).

    Thanks for the chat.

    Georges

  9. #9
    Join Date
    Aug 2004
    Location
    Gent, Belgium
    Posts
    74
    How fast are You ??,

    http://www.bmeijer.com/games/reaction_tester/

    Enjoy

    Georges

  10. #10
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,056
    My reaction time is 375 milli-seconds

  11. #11
    Join Date
    Aug 2004
    Location
    Gent, Belgium
    Posts
    74

    Talking

    That's because You are a real road runner !

    Georges

  12. #12
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,056
    Ack! Me a road runner? Watch the name calling there Beaker.
    Har.

    Actually, I tried it about 5 times and only reported my best score. If I averaged them, it might add 100 - 200 msec to my score.

  13. #13
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,135
    My score = 225ms

    See: Attachment

    Sincerely,
    Attached Images
    Intrigued

  14. #14
    Join Date
    Aug 2004
    Location
    Gent, Belgium
    Posts
    74
    225 !!! Whaw This is really FAST...

    Georges (only 375 msec with practise)

  15. #15
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,135
    Quote Originally Posted by Georges
    225 !!! Whaw This is really FAST...

    Georges (only 375 msec with practise)
    I probable did the exercise about 10 to 15 times.

    I had, I believe it was, three (3) of the 225ms.

    Online Medal of Honor - Allied Assault gaming skills coming in handy finally. (grin)
    Intrigued

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Example: Make an Image 'Follow' the Mouse Cursor
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 05-18-2004, 09:06 AM
  2. 1 AVI file = 1 Video + 2 Audio streams
    By dmla in forum AutoPlay Media Studio 4.0
    Replies: 0
    Last Post: 07-15-2003, 09:41 AM
  3. Replies: 13
    Last Post: 04-18-2003, 08:40 PM
  4. Move the mouse pointer?
    By Lazerpower in forum AutoPlay Media Studio 4.0
    Replies: 2
    Last Post: 04-08-2003, 02:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts