babou Posted January 19, 2009 Share Posted January 19, 2009 Hi all, I would like to know in a user session, witch screensaver is active, witch desktop is active, and how to change them if it is a bad configuration. I have found that on the forum, I can know if a screensaver is active $dll = DllOpen("user32.dll") $retvaL = DllCall($dll, "long", "SystemParametersInfo", "long", $SPI_SETSCREENSAVEACTIVE, "long", $lActiveFlag, "long", 0, "long", 0) DllClose($dll) But i cannot know witch one is used. I have got the same pb for the desktop. Thanks all Link to comment Share on other sites More sharing options...
herewasplato Posted January 19, 2009 Share Posted January 19, 2009 The scr file in use is locked and is listed in the registry. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Manjish Posted January 19, 2009 Share Posted January 19, 2009 Hi all, I would like to know in a user session, witch screensaver is active, witch desktop is active, and how to change them if it is a bad configuration. I have found that on the forum, I can know if a screensaver is active $dll = DllOpen("user32.dll") $retvaL = DllCall($dll, "long", "SystemParametersInfo", "long", $SPI_SETSCREENSAVEACTIVE, "long", $lActiveFlag, "long", 0, "long", 0) DllClose($dll) But i cannot know witch one is used. I have got the same pb for the desktop. Thanks all Hi, using WMI u can get which wallpaper is used, and also which screen saver is active. the windows scriptomatic package is attached. Select the Win32_Desktop group from it adn click run. and ya, u can directly use the code given there into autoit. It will work gr8. just check it out. i dnt hv time to write the entire script, so please help urself to it. [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
babou Posted January 19, 2009 Author Share Posted January 19, 2009 thank you very much, but i would like to work with user32.dll, "SystemParametersInfo", to know witch wallpaper is used and witch sreensaver is used. To install the wallpaper i would like to use "setdeskwallpaper" and a another user32.dll function to install screensaver. Is it possible to do it ? a how to script it ? thanks all Link to comment Share on other sites More sharing options...
Manjish Posted January 19, 2009 Share Posted January 19, 2009 hey i think this can be of some use to u. please check it out and tell me. I hav only worked once with API, personally i prefer WMI. anyways, hope u get what u need. [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
babou Posted January 19, 2009 Author Share Posted January 19, 2009 Very good it is what i was looking for i just have to find now the same code for wallpaper Link to comment Share on other sites More sharing options...
Manjish Posted January 19, 2009 Share Posted January 19, 2009 Very good it is what i was looking fori just have to find now the same code for wallpaper maybe this for wallpaper [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
babou Posted January 19, 2009 Author Share Posted January 19, 2009 thanks a lot, i begin my script Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now