>Christian
>
>Thanks for the answer
>
>My first priority is to turn the screen saver OFF it it's already started
>This I can't do at the moment - I think your code is to turn it ON
>Then I need to disable it to stop it returning until I'm ready
>
>Then when I have finished I want to enable it again
>
>The last 2 points I think I have now managed with George's code but I haven't been able to turn OFF the screen saver once it has started
>
>Thanks
>
Colin,
Here's how to find out if it's (the screen saver) running and stop it if so.
lcstars = "C:\WINNT\SYSTEM32\SSSTARS.SCR"
oShell = CREATEOBJECT('WScript.Shell')
oShell.Run(lcstars)
#define SPI_GETSCREENSAVERRUNNING 114
DECLARE SHORT SystemParametersInfo IN Win32API;
INTEGER uiAction, SHORT uiParam,;
SHORT @pvParam, INTEGER fWinIni
lnvparm = 0
lnresult = SystemParametersInfo;
(SPI_GETSCREENSAVERRUNNING, 0, @lnvparm, 0)
IF lnresult = 1 THEN
MOUSE AT 1, 1 DRAG TO 1, 2
ENDIF
This will start the screen saver and almost immediately terminate it. You might want to put in a pause loop.
George
Ubi caritas et amor, deus ibi est