Dalex Posted February 19, 2006 Share Posted February 19, 2006 I'm a N00B I and I just cant figure somethig out, I want to build a script that will set Windows XP Desktop theme to "windows classic" so far my script will open the display properties and open the dropdown ComboBox but I can't get it to select "Windows Classic". I want it to select Windows Classic specifically. Thanks for any help I know this is simple question , but I am stumped. [size="2"][u]Beer is living proof that God loves us and wants us to be happy.-- Ben Franklin[/u][/size] Link to comment Share on other sites More sharing options...
BigDod Posted February 19, 2006 Share Posted February 19, 2006 I'm a N00B I and I just cant figure somethig out, I want to build a script that will set Windows XP Desktop theme to "windows classic" so far my script will open the display properties and open the dropdown ComboBoxbut I can't get it to select "Windows Classic". I want it to select Windows Classic specifically.Thanks for any help I know this is simple question , but I am stumped. Can you please show us what you have tried so far. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Valuater Posted February 19, 2006 Share Posted February 19, 2006 I'm a N00B I and I just cant figure somethig out, I want to build a script that will set Windows XP Desktop theme to "windows classic" so far my script will open the display properties and open the dropdown ComboBox but I can't get it to select "Windows Classic". I want it to select Windows Classic specifically. Thanks for any help I know this is simple question , but I am stumped. Welcome to the AutoIt Forums... Dalex here is a starting point for you... Local $RUNDLL32 = @SystemDir & "\rundll32.exe" Run($RUNDLL32 & " shell32.dll,Control_RunDLL desk.cpl") While WinActivate("Display Properties", "Screen Saver") <> 1 ControlSend("Display Properties", "", "SysTabControl321", "{RIGHT}") Sleep(200) WEnd WinActivate("Display Properties", "Screen Saver") WinWait("Display Properties", "Screen Saver") Sleep (1000) ControlSetText("Display Properties", "Screen Saver", 1306, "20") Sleep (1000) While WinActivate("Display Properties", "Settings") <> 1 ControlSend("Display Properties", "", "SysTabControl321", "{RIGHT}") Sleep(200) WEnd you will need to learn about ControlCommand() in help a great place to really start is "Welcome to AutoIt 1-2-3"... it is in my sgnature below 8) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 19, 2006 Moderators Share Posted February 19, 2006 (edited) That's funny, I decided to play with it too... here's another look:ChangeToClassic() Func ChangeToClassic() $opt = Opt('WinTitleMatchMode', 4) Run('rundll32.exe shell32.dll,Control_RunDLL desk.cpl') WinWait('Display Properties') ControlCommand('Display Properties', '', 'ComboBox1', 'SelectString', 'Windows Classic') ControlClick('Display Properties', '&Apply', 'Button5') Do Sleep(10) Until Not WinExists('classname=CoverWindowClass') ControlClick('Display Properties', 'OK', 'Button3') Opt('WinTitleMatchMode', $opt) EndFunc Edit: Added WinWait() instead of Sleep() Edited February 19, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Valuater Posted February 19, 2006 Share Posted February 19, 2006 ahh... you gave hime the control command... i just gave a demo script.. nice SmOke_N 8) Link to comment Share on other sites More sharing options...
BigDod Posted February 19, 2006 Share Posted February 19, 2006 Here is my pathetic attempt #include <Process.au3> Opt("WinTitleMatchMode", 4) _RunDOS("start c:\windows\system32\desk.cpl") WinWait("Display Properties","A theme is a background plus a") ControlCommand("Display Properties","A theme is a background plus a","ComboBox1","SelectString",'Windows Classic') ControlClick("Display Properties","A theme is a background plus a","Button3") Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Dalex Posted February 19, 2006 Author Share Posted February 19, 2006 (edited) Here is my pathetic attempt #include <Process.au3> Opt("WinTitleMatchMode", 4) _RunDOS("start c:\windows\system32\desk.cpl") WinWait("Display Properties","A theme is a background plus a") ControlCommand("Display Properties","A theme is a background plus a","ComboBox1","SelectString",'Windows Classic') ControlClick("Display Properties","A theme is a background plus a","Button3") Wow that is very elaborate here is what I was using to get the window open drop the box. thanks Smoke_n that one worked send("#r") Send ("desk.cpl") Send("{ENTER}") WinWaitActive("Display Properties") ControlCommand("Display Properties", "", "ComboBox1", "ShowDropDown", "") Edited February 19, 2006 by Dalex [size="2"][u]Beer is living proof that God loves us and wants us to be happy.-- Ben Franklin[/u][/size] Link to comment Share on other sites More sharing options...
Dalex Posted February 19, 2006 Author Share Posted February 19, 2006 Wow that is very elaborate here is what I was using to get the window open drop the box. thanks Smoke_n that one workedsend("#r")Send ("desk.cpl")Send("{ENTER}")WinWaitActive("Display Properties")ControlCommand("Display Properties", "", "ComboBox1", "ShowDropDown", "")yours too Big Dodthanks looks like I have a lot more reading to do! [size="2"][u]Beer is living proof that God loves us and wants us to be happy.-- Ben Franklin[/u][/size] 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