pauledavey Posted July 23, 2004 Share Posted July 23, 2004 If anyone can help with this I would be most greatful..I have a custom theme that I have created for Windows XP. I goto the display properties, and select the Theme, then click OK and the theme is applied.What I need to do is to automate the process of clicking that OK button to apply the theme.I was thinking of writing a VB app to do this, but I am stuck before I've started! I know how to import the registry settings, but how can I program the 'click of the OK button.' I am assuming it will be some kind of API call that windows uses. Ive looked on Technet and google but I've found nothing,Can anyone help, please?????ThanksPAul Link to comment Share on other sites More sharing options...
Glowy Posted July 23, 2004 Share Posted July 23, 2004 Have you tried AutoIt ? Link to comment Share on other sites More sharing options...
pauledavey Posted July 23, 2004 Author Share Posted July 23, 2004 Glowy,Thanks for the quick response. The thing is I need to do the 'aforementioned' without having dialog boxes popup etc.The reason being that this solution needs to be used on hundreds of machines..Any other idea's welcomed.(thanks for the idea Glowy!)P Link to comment Share on other sites More sharing options...
pauledavey Posted July 23, 2004 Author Share Posted July 23, 2004 Help, please. Any ideas???????????????? Link to comment Share on other sites More sharing options...
jdoe Posted July 23, 2004 Share Posted July 23, 2004 You can use a VBScript instead of a VB App to apply the theme immediatelyDepending where your theme is in the list, you just play with the line WSS.SendKeys "{DOWN}" or WSS.SendKeys "{UP}" for selecting your theme.settheme.vbsSet WSS = CreateObject("WScript.Shell")WSS.Run "CONTROL.EXE DESK.CPL"WScript.Sleep 500 'if your computer is slow increase this valueWSS.SendKeys "{DOWN}" 'line for selecting your theme before {ENTER}WSS.SendKeys "{DOWN}" 'line for selecting your theme before {ENTER}WSS.SendKeys "{ENTER}" 'apply your theme and close display panelIf you want a VB App with a button you will need a window to click a button anyway. Link to comment Share on other sites More sharing options...
pauledavey Posted August 2, 2004 Author Share Posted August 2, 2004 The problem is that sendkeys sucks - it can be interupted by the user and you see what is happening on the screen. I want it to be a seamless change for the user Link to comment Share on other sites More sharing options...
pauledavey Posted August 4, 2004 Author Share Posted August 4, 2004 OK.I know that the API that I need to use is setCurrentTheme , but where can I find syntax for this?I have googled and looked on technet but I haven't found a thing out!!Any idea's??? Link to comment Share on other sites More sharing options...
pauledavey Posted August 5, 2004 Author Share Posted August 5, 2004 Well, I can't believe that there is no way of doing this - it MUST be possible because WindowsBlinds exists...Does anyone out there know how to get a list of the API names from the uxtheme, user etc etc dll files.. that would be a great help. I need to figure out the syntax to these calls and then I can get it working..So far, I have a form in vb6 that when you check a tickbox it enables or disables the current WINDOWS theme !! :-0 (works with Luna anyway)..Picking one , loading it and setting it however is a nightmare!Does anyone have any idea's??? I cant believe Ive come this far with it and cant get any further down the road... Link to comment Share on other sites More sharing options...
pauledavey Posted August 11, 2004 Author Share Posted August 11, 2004 Come on guys, lets re-write windows blinds !!! 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