With _SS_UDF.au3 the close process is working properly but not the close of ss process when selecting another ss in ComboBox!...
Yeah, this is why I got started writing Screensaver.au3
Hey, I found a problem in using _SS_ShallExit_OnTimer - the problem is that if the system closes the $_SS_Gui which is the GUI created in _SS_GUICreate, then all the timers associated with that GUI are killed and _SS_ShallExit_OnTimer is never called that one last time it needs to be called.
But if you aren't using _SS_ShallExit_OnTimer like "Light a Candle" does, but only using _SS_ShouldExit, I have a fix already.
v0.99 will be finished soon, I hope, but here is what I have going so far...
Once you have the actual handle to Display Properties, rather than just its tab control, then this works to get the PID of the correct rundll32.exe process (in __SS_ClosePrevInstance_OpenDLL):
$iDP_pid = WinGetProcess($hAppletWin)
Then in the _SS_ShouldExit function, this should work (for under the "Install" case:)
If Not ProcessExists($iDP_pid) Then Return 1
To get the handle of the actual $hAppletWin, we just use these two lines:
Local $hParentStatic1 = __WinGetParent($hWinLittlePreview, $hUser32DLL)
$hScrTab = __WinGetParent($hParentStatic1, $hUser32DLL); Screen Saver tab of the applet window.
in place of this line in __SS_ClosePrevInstance_OpenDLL ...
$hScrTab = __WinGetParent($hWinLittlePreview, $hUser32DLL)
By the way, the problem is not a Vista problem only. I got some situation also on my XP.
This kind of information helps a lot.
A non-working redo of the function _SS_ShallExit_OnTimer was removed.
Just found a solution to the_SS_ShallExit_OnTimer problem - attaching the timers to the hidden AutoIt window. This window does not close, it seems, until the whole script exits!
Edited by Squirrely1, 14 August 2008 - 02:32 PM.