ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   simulate mouse movement (https://www.excelbanter.com/excel-programming/376101-simulate-mouse-movement.html)

[email protected]

simulate mouse movement
 
ok... tricky / unsolvable I think...

I've got a risk model, written in excel / vba which takes a few hours
to run and I've got to run lots (c100) of them...

I've written a vba script (with the help of this group) which automates
this running, setting all the inputs etc etc etc - this works perfectly
:)

However.. there's an issue with the machine I'm running it on which I
can't work out how to solve. Every 15 minutes it goes on its windows
programmed powersave task / logoff. This *shouldn't* be a problem with
the vba, but I believe its messing with another part of the model
(running in S plus).

I want to stop it doing this, without having to babysit think for hours
on end, and the easiest way seems to be to simulate a key press or a
mouse movement to stop it messing up.

rationale:

1. it's a corporate laptop, completely locked down and impossible to
adjust all the security / powersaving settings, so I can't adjust it
this way.

2. I can't install anything on it (including any compilers) so the only
two programming languages I have available to me are vba and python
(otherwise I'm sure I could do it in C, or with some windows API call)
- hence my asking here.

Like I said, not sure if it's possible, but any help / ideas would be
very gratefully received...

Cheers

Chris


NickHK

simulate mouse movement
 
VBA gives access to pretty much all the Windows API.
Does this help ?

http://msdn.microsoft.com/library/de...metersinfo.asp

may be with
SPI_GETBLOCKSENDINPUTRESETS
SPI_SETSCREENSAVEACTIVE

NickHK

wrote in message
ups.com...
ok... tricky / unsolvable I think...

I've got a risk model, written in excel / vba which takes a few hours
to run and I've got to run lots (c100) of them...

I've written a vba script (with the help of this group) which automates
this running, setting all the inputs etc etc etc - this works perfectly
:)

However.. there's an issue with the machine I'm running it on which I
can't work out how to solve. Every 15 minutes it goes on its windows
programmed powersave task / logoff. This *shouldn't* be a problem with
the vba, but I believe its messing with another part of the model
(running in S plus).

I want to stop it doing this, without having to babysit think for hours
on end, and the easiest way seems to be to simulate a key press or a
mouse movement to stop it messing up.

rationale:

1. it's a corporate laptop, completely locked down and impossible to
adjust all the security / powersaving settings, so I can't adjust it
this way.

2. I can't install anything on it (including any compilers) so the only
two programming languages I have available to me are vba and python
(otherwise I'm sure I could do it in C, or with some windows API call)
- hence my asking here.

Like I said, not sure if it's possible, but any help / ideas would be
very gratefully received...

Cheers

Chris





All times are GMT +1. The time now is 02:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com