Achilles Posted May 28, 2010 Share Posted May 28, 2010 (edited) Hey, title explains most of it.. I just want to see if this theme list is the same as you get when you right click your desktop and go to "Personalize".. expandcollapse popup#include <Array.au3> #include <File.au3> $array = _GetThemeList() _ArrayDisplay($array) Func _GetThemeList() Local $words[9][2] = [['AU', 'Australia'], ['CA', 'Canada'], ['GB', 'United Kingdom'], ['Hc1', 'High Contrast #1'], _ ['hc2', 'High Contrast #2'], ['hcblack', 'High Contrast Black'], ['hcwhite', 'High Contrast White'], _ ['US', 'United States'], ['ZA', 'South Africa']] Local $ret[1] $temp = _FileListToArray(@WindowsDir & '\Resources\Themes', '*.theme', 1) If $temp <> 0 Then ReDim $ret[$temp[0]][2] For $i = 1 To UBound($temp) - 1 $ret[$i - 1][0] = $temp[$i] $ret[$i - 1][1] = @WindowsDir & '\Resources\Themes\' & $temp[$i] Next EndIf $temp = _FileListToArray(@UserProfileDir & '\AppData\Local\Microsoft\Windows\Themes', '*.theme', 1) If $temp <> 0 Then For $i = 1 To UBound($temp) - 1 ReDim $ret[UBound($ret)+1][2] $ret[UBound($ret)-1][0] = $temp[$i] $ret[UBound($ret)-1][1] = @UserProfileDir & '\AppData\Local\Microsoft\Windows\Themes\' & $temp[$i] Next EndIf $temp = _FileListToArray(@WindowsDir & '\Resources\Ease of Access Themes', '*.theme', 1) If $temp <> 0 Then For $i = 1 To $temp[0] ReDim $ret[UBound($ret)+1][2] $ret[UBound($ret)-1][0] = $temp[$i] $ret[UBound($ret)-1][1] = @WindowsDir & '\Resources\Ease of Access Themes\' & $temp[$i] Next EndIf $temp = _FileListToArray(@WindowsDir & '\Globalization\MCT', '*', 2) If $temp <> 0 Then For $i = 1 To $temp[0] $temp2 = _FileListToArray(@WindowsDir & '\Globalization\MCT\' & $temp[$i], '*', 2) If $temp2 <> 0 Then For $i2 = 1 To $temp2[0] $temp3 = _FileListToArray(@WindowsDir & '\Globalization\MCT\' & $temp[$i] & '\' & $temp2[$i2], '*.theme', 1) If $temp3 <> 0 Then For $i3 = 1 To $temp3[0] ReDim $ret[UBound($ret)+1][2] $ret[UBound($ret)-1][0] = $temp3[$i3] $ret[UBound($ret)-1][1] = @WindowsDir & '\Globalization\MCT\' & $temp[$i] & '\' & $temp2[$i2] & '\' & $temp3[$i3] Next EndIf Next EndIf Next EndIf _ArraySort($ret) For $i = 0 To UBound($ret) - 1 $temp = StringTrimRight($ret[$i][0], 6) ; get rid of .theme $l = StringLeft($temp, 1) $temp = StringUpper($l) & StringRight($temp, StringLen($temp) - 1) $ret[$i][0] = $temp Next For $i = 0 to UBound($ret) - 1 $temp = _ArraySearch($words, $ret[$i][0]) ;~ ConsoleWrite('>Searching: ' & $ret[$i][0] & @TAB & 'Result: ' & $temp & @CRLF) If $temp > -1 then $ret[$i][0] = $words[$temp][1] Next Return $ret EndFunc ;==>_GetThemeList Edit: Added some specific country themes Edit2: Added some more stuff Edited May 28, 2010 by Achilles My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
DW1 Posted May 28, 2010 Share Posted May 28, 2010 (edited) Script returned:Aero Architecture Characters Custom Landscapes Nature ScenesThis is listing the Aero themes, but is missing one that was listed in personalize. In personalize, I also have a theme called "United States".Here is my personalize menu: Edited May 28, 2010 by danwilli AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Achilles Posted May 28, 2010 Author Share Posted May 28, 2010 Script returned: Aero Architecture Characters Custom Landscapes Nature Scenes This is listing the Aero themes, but is missing one that was listed in personalize. In personalize, I also have a theme called "United States". Here is my personalize menu: <pic> I just saw that it has some based off of what country your in (I think...).. mind testing it again? I think I'm going to running into problems with themes being named the same when it comes to actually using this list My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Achilles Posted May 28, 2010 Author Share Posted May 28, 2010 Also, at first I thought I wouldn't include all the old ones (the Basic and High Contrast ones) but on second thought I think it would be nice to have those.. Only trouble is I can't seem to find them.. any know where they are? My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
DW1 Posted May 28, 2010 Share Posted May 28, 2010 (edited) Yes that gets them all. I also whipped this up to grab them: expandcollapse popup#include <Array.au3> #include <File.au3> $array = _GetThemeList() _ArrayDisplay($array) Func _GetThemeList() Local $ret[1] $temp = _FileListToArray(@WindowsDir & '\Resources\Themes', '*.theme', 1) If $temp <> 0 Then ReDim $ret[$temp[0]][2] For $i = 1 To UBound($temp) - 1 $ret[$i - 1][0] = $temp[$i] $ret[$i - 1][1] = @WindowsDir & '\Resources\Themes\' & $temp[$i] Next EndIf $temp = _FileListToArray(@UserProfileDir & '\AppData\Local\Microsoft\Windows\Themes', '*.theme', 1) If $temp <> 0 Then For $i = 1 To UBound($temp) - 1 ReDim $ret[UBound($ret)+1][2] $ret[UBound($ret)-1][0] = $temp[$i] $ret[UBound($ret)-1][1] = @UserProfileDir & '\AppData\Local\Microsoft\Windows\Themes\' & $temp[$i] Next EndIf $temp = _FileListToArray(@WindowsDir & '\Resources\Ease of Access Themes', '*.theme', 1) If $temp <> 0 Then For $i = 1 To $temp[0] ReDim $ret[UBound($ret)+1][2] $ret[UBound($ret)-1][0] = $temp[$i] $ret[UBound($ret)-1][1] = @WindowsDir & '\Resources\Ease of Access Themes\' & $temp[$i] Next EndIf $temp = _FileListToArray(@WindowsDir & '\Globalization\MCT', '*', 2) If $temp <> 0 Then For $i = 1 To $temp[0] $temp2 = _FileListToArray(@WindowsDir & '\Globalization\MCT\' & $temp[$i], '*', 2) If $temp2 <> 0 Then For $i2 = 1 To $temp2[0] $temp3 = _FileListToArray(@WindowsDir & '\Globalization\MCT\' & $temp[$i] & '\' & $temp2[$i2], '*.theme', 1) If $temp3 <> 0 Then For $i3 = 1 To $temp3[0] ReDim $ret[UBound($ret)+1][2] $ret[UBound($ret)-1][0] = $temp3[$i3] $ret[UBound($ret)-1][1] = @WindowsDir & '\Globalization\MCT\' & $temp[$i] & '\' & $temp2[$i2] & '\' & $temp3[$i3] Next EndIf Next EndIf Next EndIf _ArraySort($ret) For $i = 0 To UBound($ret) - 1 $temp = StringTrimRight($ret[$i][0], 6) ; get rid of .theme $l = StringLeft($temp, 1) $temp = StringUpper($l) & StringRight($temp, StringLen($temp) - 1) $ret[$i][0] = $temp Next Return $ret EndFunc ;==>_GetThemeList This way if for any reason there are additional themes in the global section, we grab them. EDIT: Redim was in wrong section... fixed that and added the basic themes. Edited May 28, 2010 by danwilli AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Achilles Posted May 28, 2010 Author Share Posted May 28, 2010 Yes that gets them all. I also whipped this up to grab them: expandcollapse popup#include <Array.au3> #include <File.au3> $array = _GetThemeList() _ArrayDisplay($array) Func _GetThemeList() Local $ret[1] $temp = _FileListToArray(@WindowsDir & '\Resources\Themes', '*.theme', 1) If $temp <> 0 Then ReDim $ret[$temp[0]][2] For $i = 1 To UBound($temp) - 1 $ret[$i - 1][0] = $temp[$i] $ret[$i - 1][1] = @WindowsDir & '\Resources\Themes\' & $temp[$i] Next EndIf $temp = _FileListToArray(@UserProfileDir & '\AppData\Local\Microsoft\Windows\Themes', '*.theme', 1) If $temp <> 0 Then For $i = 1 To UBound($temp) - 1 ReDim $ret[UBound($ret)+1][2] $ret[UBound($ret)-1][0] = $temp[$i] $ret[UBound($ret)-1][1] = @UserProfileDir & '\AppData\Local\Microsoft\Windows\Themes\' & $temp[$i] Next EndIf $temp = _FileListToArray(@WindowsDir & '\Resources\Ease of Access Themes', '*.theme', 1) If $temp <> 0 Then For $i = 1 To $temp[0] ReDim $ret[UBound($ret)+1][2] $ret[UBound($ret)-1][0] = $temp[$i] $ret[UBound($ret)-1][1] = @WindowsDir & '\Resources\Ease of Access Themes\' & $temp[$i] Next EndIf $temp = _FileListToArray(@WindowsDir & '\Globalization\MCT', '*', 2) If $temp <> 0 Then For $i = 1 To $temp[0] $temp2 = _FileListToArray(@WindowsDir & '\Globalization\MCT\' & $temp[$i], '*', 2) If $temp2 <> 0 Then For $i2 = 1 To $temp2[0] $temp3 = _FileListToArray(@WindowsDir & '\Globalization\MCT\' & $temp[$i] & '\' & $temp2[$i2], '*.theme', 1) If $temp3 <> 0 Then For $i3 = 1 To $temp3[0] ReDim $ret[UBound($ret)+1][2] $ret[UBound($ret)-1][0] = $temp3[$i3] $ret[UBound($ret)-1][1] = @WindowsDir & '\Globalization\MCT\' & $temp[$i] & '\' & $temp2[$i2] & '\' & $temp3[$i3] Next EndIf Next EndIf Next EndIf _ArraySort($ret) For $i = 0 To UBound($ret) - 1 $temp = StringTrimRight($ret[$i][0], 6) ; get rid of .theme $l = StringLeft($temp, 1) $temp = StringUpper($l) & StringRight($temp, StringLen($temp) - 1) $ret[$i][0] = $temp Next Return $ret EndFunc ;==>_GetThemeList This way if for any reason there are additional themes in the global section, we grab them. EDIT: Redim was in wrong section... fixed that and added the basic themes. Wow, awesome thanks for that! the only think I'll probably add is a simply little function that goes through and replaces things like hc1 with High Contrast #1, or AU with Australia My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Tvern Posted May 28, 2010 Share Posted May 28, 2010 Not sure if you still need feedback, but I'm a little unsure about my results:I have 1 custom theme, 6 aero and 6 basic for a total of 13 themes, however it only lists 12.I can account for all aero themes, but I have 6 basic themes that I can't link to the 5 remaining themes on the list.listed themes - personalize menu themesAero - "Windows 7"Architecture- "Architectuur"Characters - "Figuren"Landscapes - "Landschaoppen"Nature - "Openlucht"Scenes - "Scènes"MyCustom - "My custom theme"Australia - ?Canada -?South Africa - ?United Kingdom - ?United States - ? - "Windows 7 Basic"? - "Windows-klassiek"? - "Hoog Contrast nr.1"? - "Hoog Contrast nr.2"? - "Zwart - hoog contrast"? - "Wit - hoog contrast"Red themes are on the list, but I don't know what theme they corrospond to.Blue themes are in the personalize menu, but I don't know what list item they corrospond to.Win7 Ultimate x64 (English with dutch language pack) Link to comment Share on other sites More sharing options...
DW1 Posted May 28, 2010 Share Posted May 28, 2010 The red ones are often hidden from the user, as they are only presented if you are in that particular region. For the blue ones, you should see HC1 = "Hoog Contrast nr.1" etc... abbreviations. AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Tvern Posted May 28, 2010 Share Posted May 28, 2010 They don't show up at all. It turns out the classic themes are located in @WindowsDir & '\Resources\Ease of Access Themes' So they are not found by your script. Link to comment Share on other sites More sharing options...
DW1 Posted May 28, 2010 Share Posted May 28, 2010 They don't show up at all. It turns out the classic themes are located in @WindowsDir & '\Resources\Ease of Access Themes' So they are not found by your script. That IS in the script... $temp = _FileListToArray(@WindowsDir & '\Resources\Ease of Access Themes', '*.theme', 1) Are you using the version in post 5? AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Achilles Posted May 28, 2010 Author Share Posted May 28, 2010 (edited) Ok, I updated the original code with the changes danwilli made (thanks!).. I made it so the names turn out nicer.. Here are the results I get: [0]|Aero|C:\Windows\Resources\Themes\aero.theme [1]|Architecture|C:\Windows\Resources\Themes\architecture.theme [2]|Australia|C:\Windows\Globalization\MCT\MCT-AU\Theme\AU.theme [3]|Basic|C:\Windows\Resources\Ease of Access Themes\basic.theme [4]|Canada|C:\Windows\Globalization\MCT\MCT-CA\Theme\CA.theme [5]|Characters|C:\Windows\Resources\Themes\characters.theme [6]|Classic|C:\Windows\Resources\Ease of Access Themes\classic.theme [7]|United Kingdom|C:\Windows\Globalization\MCT\MCT-GB\Theme\GB.theme [8]|High Contrast #1|C:\Windows\Resources\Ease of Access Themes\hc1.theme [9]|High Contrast #2|C:\Windows\Resources\Ease of Access Themes\hc2.theme [10]|High Contrast Black|C:\Windows\Resources\Ease of Access Themes\hcblack.theme [11]|High Contrast White|C:\Windows\Resources\Ease of Access Themes\hcwhite.theme [12]|Landscapes|C:\Windows\Resources\Themes\landscapes.theme [13]|Nature|C:\Windows\Resources\Themes\nature.theme [14]|Old Backgrounds|C:\Users\Michael\AppData\Local\Microsoft\Windows\Themes\Old Backgrounds.theme [15]|Scenes|C:\Windows\Resources\Themes\scenes.theme [16]|Select Windows|C:\Users\Michael\AppData\Local\Microsoft\Windows\Themes\Select Windows.theme [17]|United States|C:\Windows\Globalization\MCT\MCT-US\Theme\US.theme [18]|South Africa|C:\Windows\Globalization\MCT\MCT-ZA\Theme\ZA.theme Edit: Ugh, looks like I'm going to have to do some language changes... Edited May 28, 2010 by Achilles My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Tvern Posted May 28, 2010 Share Posted May 28, 2010 The one in the original post. For some reason I assumed that one would be up to date, "Example script" style. All is well. I'll be the one in the corner with the donkey ears. Link to comment Share on other sites More sharing options...
Achilles Posted May 28, 2010 Author Share Posted May 28, 2010 The one in the original post. For some reason I assumed that one would be up to date, "Example script" style.All is well. I'll be the one in the corner with the donkey ears.lol, that was my bad.. it would make sense to keep the code that needed to be testing in the original post.. My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] 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