Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Mouse move triggered by a Window Opening?  (Read 2503 times)

0 Members and 1 Guest are viewing this topic.

protokatie

  • I DO try to be insulting and horrible to my fellow Terran
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1396
  • Last login:March 27, 2012, 09:36:43 pm
  • Is anyone here a member of team retard?
Mouse move triggered by a Window Opening?
« on: January 31, 2010, 12:14:10 am »
I know some of my requests are odd, but this one has a good reason.

Basically, my magic jack computer has an old screen hooked to it to show the weather and the MJ window. To show the screen I only have to jiggle the mouse, but I would like the screen to come out of power saving when a new call comes in. In the case of magic jack, it opens a small window showing the number that is calling, and I would like this to trigger a mouse move or a keypress to show the screen.

Is there an Autohotkey script for this? Or maybe something else?

Any ideas?
--- Yes I AM doing this on purpose, and yes I DO realize it is pissing you off.

---If my computers were cats, my place would look like an old widows house, with half of the cats having obvious health problems

Vanguard

  • The aliens are using their mouthpiece, "Saint" to discredit my theory.
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 320
  • Last login:July 18, 2025, 02:46:42 am
Re: Mouse move triggered by a Window Opening?
« Reply #1 on: January 31, 2010, 10:43:56 pm »
You could write a little C program that uses SetWindowsHookEx.

This allows you to have a program running that can monitor all windows messages being passed around the system.   When the MJ window pops up, you could then send a keypress event.

protokatie

  • I DO try to be insulting and horrible to my fellow Terran
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1396
  • Last login:March 27, 2012, 09:36:43 pm
  • Is anyone here a member of team retard?
Re: Mouse move triggered by a Window Opening?
« Reply #2 on: January 31, 2010, 11:32:49 pm »
You could write a little C program that uses SetWindowsHookEx.

This allows you to have a program running that can monitor all windows messages being passed around the system.   When the MJ window pops up, you could then send a keypress event.

That would be great if I knew the OS calls, and was used to coding under windows, but as it stands, my C coding is limited to DOS Ansi C (DJGPP). I know I am imposing, but could your write a small app that not only moved the mouse but made it look like a hardware move (or hardware keypress) for me? If not, then it is no big deal.
--- Yes I AM doing this on purpose, and yes I DO realize it is pissing you off.

---If my computers were cats, my place would look like an old widows house, with half of the cats having obvious health problems

Vanguard

  • The aliens are using their mouthpiece, "Saint" to discredit my theory.
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 320
  • Last login:July 18, 2025, 02:46:42 am
Re: Mouse move triggered by a Window Opening?
« Reply #3 on: February 01, 2010, 09:12:38 am »
I'll need to send you a program called spy++ that comes with MS development tools.   I need to know what messages the MJ application sends when it gets a phone call so I can key off those.

You would just run spyxx.exe and it will show you all the windows on the system.  You selecte the MJ window and then have it log the windows messages.  Then, call yourself and see what gets logged.

The MJ application must be running in the background all the time and then just pops up a dialog.  You should be able to find the background MJ application with spy++.

I can write you the program but it may take some going back and forth to get it working.   I'm not sure if a mouse move through an API will have the same effect as a physical mouse move either.   We can try though.   Is the program you are trying to interrupt running as a screensaver?

If you already have Visual Studios, then you should have spyxx.exe.
« Last Edit: February 01, 2010, 09:17:45 am by Vanguard »

RayB

  • I'm not wearing pants! HA!
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11279
  • Last login:July 10, 2025, 01:33:58 am
  • There's my post
    • RayB.com
Re: Mouse move triggered by a Window Opening?
« Reply #4 on: February 01, 2010, 01:35:02 pm »
Arent there settings for "wake on activity" ? 
NO MORE!!

protokatie

  • I DO try to be insulting and horrible to my fellow Terran
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1396
  • Last login:March 27, 2012, 09:36:43 pm
  • Is anyone here a member of team retard?
Re: Mouse move triggered by a Window Opening?
« Reply #5 on: February 01, 2010, 01:45:32 pm »
Vanguard, I have Visual C Studio somewhere, so maybe sending me the exe would be better (trust me when I say "somewhere" as I look out into space). (oddly enough as I was typing I looked right at it, but still the computer is so old I wouldn't want to install any new software on it, it chokes on firefox 3.0).

I tried a trick to see if I could do this with settings, I changed the mouse settings to automatically move the mouse to the default button of a window, but this must be purely internal as it didnt trigger the screen to power up. What ever is used must look to the computer as tho the mouse was the trigger.

RayB, if you find any such setting in Windows XP Pro (TinyXP 9) let me know. The computer isnt actually in standby, just the screen is set to go to power save after 5 minutes.
--- Yes I AM doing this on purpose, and yes I DO realize it is pissing you off.

---If my computers were cats, my place would look like an old widows house, with half of the cats having obvious health problems

Vanguard

  • The aliens are using their mouthpiece, "Saint" to discredit my theory.
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 320
  • Last login:July 18, 2025, 02:46:42 am
Re: Mouse move triggered by a Window Opening?
« Reply #6 on: February 01, 2010, 02:54:31 pm »
If the system is just in power save mode (not hibernate), then there are API's that a program can use to wake the system.

Proto, PM me and I'll send you spy++.

TOK

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3604
  • Last login:January 24, 2024, 05:14:24 pm
  • The Game Always Wins
Re: Mouse move triggered by a Window Opening?
« Reply #7 on: February 01, 2010, 03:08:36 pm »
Is the Magic Jack just a USB device?

If you go to Device Manager ->Human Interface Devices and find the Magic Jack, you can right click it, then click on Properties and the Power Management tab. There should be an option there to let the device bring the computer out of standby.


Vanguard

  • The aliens are using their mouthpiece, "Saint" to discredit my theory.
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 320
  • Last login:July 18, 2025, 02:46:42 am
Re: Mouse move triggered by a Window Opening?
« Reply #8 on: February 01, 2010, 03:40:07 pm »
I think that might only be for HID devices.   The MJ is probably always active where as a HID device requires some human interaction to bring the system out of standby.

protokatie

  • I DO try to be insulting and horrible to my fellow Terran
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1396
  • Last login:March 27, 2012, 09:36:43 pm
  • Is anyone here a member of team retard?
Re: Mouse move triggered by a Window Opening?
« Reply #9 on: February 01, 2010, 04:53:46 pm »
A point of clarification (I thought I had already done this, but meh) The computer is always active, it is simply the monitor that goes to sleep. Therefor the only thing is to get the system to "see" an activity that an HID type device would do (mouse move or keypress).

MJ is a USB device but is always active. Actually if I had the computer go to standby it would prolly shut MJ off and I wouldnt be able to receive my roomates calls..(This is why I am building a tardis... well, not a real one, but a 1960's era London Police box. I will have pics of that sometime soon).

VG, I will shoot you a PM so I can get that exe from you and report what OS calls are being made when the window opens. As I have said before, I tried using the "move mouse to default button" option but that was internal and didnt trigger an HID event to wake the screen up.
--- Yes I AM doing this on purpose, and yes I DO realize it is pissing you off.

---If my computers were cats, my place would look like an old widows house, with half of the cats having obvious health problems

RayB

  • I'm not wearing pants! HA!
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11279
  • Last login:July 10, 2025, 01:33:58 am
  • There's my post
    • RayB.com
Re: Mouse move triggered by a Window Opening?
« Reply #10 on: February 01, 2010, 11:32:23 pm »
Turn off the monitor's own standby mode, and let Windows standby be the one in use?
NO MORE!!

protokatie

  • I DO try to be insulting and horrible to my fellow Terran
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1396
  • Last login:March 27, 2012, 09:36:43 pm
  • Is anyone here a member of team retard?
Re: Mouse move triggered by a Window Opening?
« Reply #11 on: February 02, 2010, 12:42:50 am »
Turn off the monitor's own standby mode, and let Windows standby be the one in use?


It is. I do not even know if there is a monitor that has it's own standby mode. This is simply the computer dropping signal to it.

Vanguard knows what I am trying with all about with this. I just need to run the proggy he sent me on the TinyXP box, and maybe he will be able to trick the HID.
--- Yes I AM doing this on purpose, and yes I DO realize it is pissing you off.

---If my computers were cats, my place would look like an old widows house, with half of the cats having obvious health problems