The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: Any Windows gurus out there?


  • Subject: Re: Any Windows gurus out there?
  • From: danhoehnen
  • Date: Tue, 27 May 2003 13:33:00 +0000

Mark,

Your idea should work fine. The trick is how to simlulate mouse
movement or keypresses in order to disable the screen saver when
desired. ACE uses a Windows API call to move the mouse pointer in
order to achieve this same functionality. I seem to remember that it
may not work on all versions of Windows. But, I may be thinking of
something else. So, just try it.

VB declarations:

Public Declare Sub mouse_event Lib "user32" (ByVal dwFlags As
Long,
ByVal dX As Long, ByVal dY As Long, ByVal cButtons As Long, ByVal
dwExtraInfo As Long)

Public Const MOUSEEVENTF_ABSOLUTE = &H8000
Public Const MOUSEEVENTF_LEFTDOWN = &H2
Public Const MOUSEEVENTF_LEFTUP = &H4
Public Const MOUSEEVENTF_MIDDLEDOWN = &H20
Public Const MOUSEEVENTF_MIDDLEUP = &H40
Public Const MOUSEEVENTF_MOVE = &H1
Public Const MOUSEEVENTF_RIGHTDOWN = &H8
Public Const MOUSEEVENTF_RIGHTUP = &H10

mouse to center of screen:
Call mouse_event(MOUSEEVENTF_MOVE Or MOUSEEVENTF_ABSOLUTE,
32000, 32000, 0, 0)

left click:
wParam = x_position
lParam = y_position
Call mouse_event(MOUSEEVENTF_MOVE Or MOUSEEVENTF_ABSOLUTE Or
MOUSEEVENTF_LEFTDOWN, wParam, lParam, 0, 0)
Call mouse_event(MOUSEEVENTF_MOVE Or MOUSEEVENTF_ABSOLUTE Or
MOUSEEVENTF_LEFTUP, wParam, lParam, 0, 0)

middle click:
wParam = x_position
lParam = y_position
Call mouse_event(MOUSEEVENTF_MOVE Or MOUSEEVENTF_ABSOLUTE Or
MOUSEEVENTF_MIDDLEDOWN, wParam, lParam, 0, 0)
Call mouse_event(MOUSEEVENTF_MOVE Or MOUSEEVENTF_ABSOLUTE Or
MOUSEEVENTF_MIDDLEUP, wParam, lParam, 0, 0)

right click:
wParam = x_position
lParam = y_position
Call mouse_event(MOUSEEVENTF_MOVE Or MOUSEEVENTF_ABSOLUTE Or
MOUSEEVENTF_MIDDLEDOWN, wParam, lParam, 0, 0)
Call mouse_event(MOUSEEVENTF_MOVE Or MOUSEEVENTF_ABSOLUTE Or
MOUSEEVENTF_MIDDLEUP, wParam, lParam, 0, 0)

Regards,
Dan Hoehnen, President
Custom Automation Technologies, Inc.
<a href="http://www.customautomationtech.com";>http://www.customautomationtech.com</a>
<a href="mailto://dan@xxxxxxx";>mailto://dan@xxxxxxx</a>

--- In <a
href="/group/xAP_developer/post?postID=FCKbA7VZTV6r2EQo_6cLwsUNCn9cyCfVp0_RvWYrLnKI3ZAsZ7KaT3w97sYCOMuRRo0cRwVKoOZpcQMAjStOpwkjYOv_">xAP_developer@xxxxxxx</a>,
"mark_harrison_uk2" <mph@a...>
wrote:
> Hi all,
>
> I'm thinking of wall-mounting my Fujitsu, and using it as a display
> device.
>
> I only want it to display under certain conditions, such as when
> (occupancy detection) xAP messages are received.
>
> Otherwise I'd like it to blank-screen.
>
> Any ideas on how best to acheive this?
>
> I'd thought of a simple screen-saver that automatically came on
after
> a minute of inactivity, and exited in response to a mouse trigger
OR
> a xAP message meeting certain criteria.
>
> The screen saver would be a "power screen down" black
screen.
>
> When the screen saver disappeared, it would display a full-screen
xAP-
> display window.
>
> Regards,
>
> Mark






xAP_Development Main Index | xAP_Development Thread Index | xAP_Development Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.