Thread: Mouse Interrupts

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    11

    Question Mouse Interrupts

    How do i create mouse interrupts in C????????????

    i wanted to create a program that would prevent my computer from falling asleep, the problem is, the BIOS looks for mouse interrupts, not just the mouse moving. So, i want to create a program that will use a interrupt to move the mouse to random locations until the user presses a hot key (or at least do somthing similar).

    PLEASE help me
    Last edited by linuxman132; 12-23-2001 at 02:31 PM.

  2. #2
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    Are you doing this in DOS or in a Windows program? You can't do it in DOS, but it can be easily done with a Windows program. You just handle the correct message.

    --Garfield
    1978 Silver Anniversary Corvette

  3. #3
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    yes i'd say that DOS and windows are pretty much independant of eachother... also, judging by your name, you're a linux man, right? any more information?
    hasafraggin shizigishin oppashigger...

  4. #4
    Registered User
    Join Date
    Dec 2001
    Posts
    11

    Post My OS

    i am working on this program for DOS,win 3.1, and win ME (for testing of program)

    but i also work on linux(only when linux's compiler works )

  5. #5
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    I'm 99.9% sure that you can't do mouse interrupts with DOS. It is a shell to Windows, so I'm sure there is a loop-hole somewhere. It isn't an OS, but a VM.

    --Garfield
    1978 Silver Anniversary Corvette

  6. #6
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    >mouse interrupts with DOS

    on the contrary, 0x33 has interrupt functions for DOS mouse control... search for Ralph Brown's Interrupt List has a complete listing of these interrupt functions, as well as all others in the interrupt vector table [including reserved... it is just about mostly complete, the best reference you can get anywhere...]

    oh, and this seems silly... but maybe you can disable your computers ASPI auto-sleep option in your bios, as well as it in your OS system...
    hasafraggin shizigishin oppashigger...

  7. #7
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,227
    um well that depends if he's actually working on DOS or the MS-DOS VM there, garf.


    And there is a way in pure DOS: http://www.c-for-dummies.com/lessons/bonus/06/

    I've also tested that compiling in DJGPP and it worked in a DOS console window. (I think it did, can't remember...) It won't compile in MSVC, though.

  8. #8
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    Get into Windows programming
    1978 Silver Anniversary Corvette

  9. #9
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    >Get into Windows programming

    ahhh shaat appp!!!

    good option, but again, is he a linuxman? and also, does he have the preq knowledge about programming to enter into a multitasking programming environment...? etc.
    hasafraggin shizigishin oppashigger...

  10. #10
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    Are you with Linux?? You should visit the Linux forum, then. We don't really have much knowledge of the Linux GUI.
    1978 Silver Anniversary Corvette

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. need Help in Mouse Pointer
    By obaid in forum C++ Programming
    Replies: 3
    Last Post: 12-07-2006, 03:33 AM
  2. Problem in mouse position
    By Arangol in forum Game Programming
    Replies: 6
    Last Post: 08-08-2006, 07:07 AM
  3. Mouse scroll stopped working
    By Waldo2k2 in forum Tech Board
    Replies: 2
    Last Post: 10-12-2004, 11:25 AM
  4. Making a mouse hover button, API style
    By hanhao in forum C++ Programming
    Replies: 1
    Last Post: 05-27-2004, 06:17 AM
  5. Game Design Topic #2 - Keyboard or Mouse?
    By TechWins in forum Game Programming
    Replies: 4
    Last Post: 10-08-2002, 03:34 PM