Guest Posted July 4, 2013 Posted July 4, 2013 hello, i want that my script will Identify the activated theme file(*.theme) that windows 7 using.. how can i do that? thanks for helpers!
Danyfirex Posted July 4, 2013 Posted July 4, 2013 (edited) Like this? #Include <WinAPIEx.au3> Opt('MustDeclareVars', 1) Global Const $SZ_THDOCPROP_CANONICALNAME = 'ThemeName' Global $Data = _WinAPI_GetCurrentThemeName() If IsArray($Data) Then ConsoleWrite('Name: ' & $Data[0] & @CR) ConsoleWrite('Name: ' & _WinAPI_GetThemeDocumentationProperty($Data[0], $SZ_THDOCPROP_CANONICALNAME) & @CR) EndIf saludos Edited July 4, 2013 by Danyfirex argumentum 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
M4n0x Posted July 4, 2013 Posted July 4, 2013 Hi, After some search in the forum : $Struct = DllStructCreate("wchar File[255];wchar Color[255];wchar Size[255]") $GetTheme = DllCall("UxTheme.dll", "int", "GetCurrentThemeName", "ptr", DllStructGetPtr($Struct, "File"), "int", 255, "ptr", DllStructGetPtr($Struct, "Color"), "int", 255, "ptr", DllStructGetPtr($Struct, "Size"), "int", 255) If DllStructGetData($Struct, 1) = "" Then MsgBox(64, "Message", "Current theme is classic") Exit EndIf MsgBox(64, "Message", "Theme file: " & DllStructGetData($Struct, 1) & @LF & @LF & _ "Color scheme: " & DllStructGetData($Struct, 2) & @LF & @LF & _ "Font size: " & DllStructGetData($Struct, 3)) source : '?do=embed' frameborder='0' data-embedContent>>
Danyfirex Posted July 4, 2013 Posted July 4, 2013 Hi, After some search in the forum : $Struct = DllStructCreate("wchar File[255];wchar Color[255];wchar Size[255]") $GetTheme = DllCall("UxTheme.dll", "int", "GetCurrentThemeName", "ptr", DllStructGetPtr($Struct, "File"), "int", 255, "ptr", DllStructGetPtr($Struct, "Color"), "int", 255, "ptr", DllStructGetPtr($Struct, "Size"), "int", 255) If DllStructGetData($Struct, 1) = "" Then MsgBox(64, "Message", "Current theme is classic") Exit EndIf MsgBox(64, "Message", "Theme file: " & DllStructGetData($Struct, 1) & @LF & @LF & _ "Color scheme: " & DllStructGetData($Struct, 2) & @LF & @LF & _ "Font size: " & DllStructGetData($Struct, 3)) source : '?do=embed' frameborder='0' data-embedContent>> same as >#2 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
Guest Posted July 4, 2013 Posted July 4, 2013 Like this? #Include <WinAPIEx.au3> Opt('MustDeclareVars', 1) Global Const $SZ_THDOCPROP_CANONICALNAME = 'ThemeName' Global $Data = _WinAPI_GetCurrentThemeName() If IsArray($Data) Then ConsoleWrite('Name: ' & $Data[0] & @CR) ConsoleWrite('Name: ' & _WinAPI_GetThemeDocumentationProperty($Data[0], $SZ_THDOCPROP_CANONICALNAME) & @CR) EndIf saludos thanks but your code is not working.. i get this error: ==> Error opening the file.: #Include <WinAPIEx.au3> Hi, After some search in the forum : $Struct = DllStructCreate("wchar File[255];wchar Color[255];wchar Size[255]") $GetTheme = DllCall("UxTheme.dll", "int", "GetCurrentThemeName", "ptr", DllStructGetPtr($Struct, "File"), "int", 255, "ptr", DllStructGetPtr($Struct, "Color"), "int", 255, "ptr", DllStructGetPtr($Struct, "Size"), "int", 255) If DllStructGetData($Struct, 1) = "" Then MsgBox(64, "Message", "Current theme is classic") Exit EndIf MsgBox(64, "Message", "Theme file: " & DllStructGetData($Struct, 1) & @LF & @LF & _ "Color scheme: " & DllStructGetData($Struct, 2) & @LF & @LF & _ "Font size: " & DllStructGetData($Struct, 3))source : '?do=embed' frameborder='0' data-embedContent>> thanks but it does not return the correct answer. the correct answer in my case is: C:UsersGilAppDataLocalMicrosoftWindowsThemes1 (2).theme
Danyfirex Posted July 4, 2013 Posted July 4, 2013 You need #Include <WinAPIEx.au3> UDF, instead You can use Autoit Beta. Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
Guest Posted July 4, 2013 Posted July 4, 2013 You need #Include <WinAPIEx.au3> UDF, instead You can use Autoit Beta. ok i did it. now it is working but it does not return the correct answer. it return this: Name: C:WindowsresourcesThemesAeroAero.msstyles Name: Aero i need that it will return the theme file.. this is what it shuld return in my case: C:UsersGilAppDataLocalMicrosoftWindowsThemes1 (2).theme
Guest Posted July 4, 2013 Posted July 4, 2013 i got it!! this is the code: RegRead("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionThemes", "CurrentTheme")
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