Jump to content
Macro Express Forums

mts0987

Members
  • Posts

    3
  • Joined

  • Last visited

mts0987's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Brilliant! That works! Thanks.
  2. Thanks for getting back! I'm not having trouble detecting that a message has come in. That's not the issue. I have the macro activation set to the window title "New Item Alert" which is the Outlook popup telling me I have a new message. That all works fine. The issue is, once the macro is activated, I only need it to actually beep if I'm not at my computer. So, the problem is, how can the macro detect that I'm not here? First, look for mouse movement. If there's no mouse movement in X seconds, I'm probably away. But just in case I'm here but not using the mouse, look for keyboard action. If there's no mouse movement, and no keyboard action, after 30 seconds (or whatever), it's a safe bet that I'm not here, so start beeping. I've figured out every piece of this except detecting keyboard activity.
  3. Hello, I'm writing a macro that I want to only execute if I'm away from the computer. Basically, if an Outlook window appears announcing a new message and I'm away from the computer, I want the computer to start beeping. I'm having trouble figuring out how to reliably detect *lack* of keyboard action without aborting the macro. Thanks in advance for any ideas. Here are the details: I have a simple routine that detects if the mouse moves over the course of 15 seconds. I grab the x,y of the mouse coords, and then check every second to see if the x,y has changed. If it has changed, I must be at the computer, and the macro stops. If the coords have not changed, then the macro goes into a loop playing an alert wav file every second until the coords do change. But what if the mouse hasn't moved because I'm typing? I need something similar in place to sniff keyboard activity. There's no "get last key pressed" variable command. I tried "Wait for keypress" [space] since if I'm typing I can assume that I'll hit the space at least once in 10 seconds. But I discovered that the macro aborts if it reaches its max time. What I really wanted was for it to wait a max of 30 seconds, and then continue, but stop waiting if a key is pressed. If I detect a keypress, I stop the macro. If I detect that it waited the max time before giving up, I can assume I'm away and start beeping. Ideas? Thanks, -- Mike
×
×
  • Create New...