Search the Community
Showing results for tags 'folder icon'.
-
Hi, Created this to replace a bunch of batch and reg files i had to do the job, Included the icons in the .rar Simply select the folder and click the button, to revert you just need to click the restore button. #region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=FoldersBox.ico #AutoIt3Wrapper_Res_Icon_Add=FoldersBox.ico #AutoIt3Wrapper_Run_Tidy=n #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <WinAPI.au3> #include <GuiEdit.au3> #include <GuiButton.au3> #include <Constants.au3> #include <GuiStatusBar.au3> #include <GUIConstants.au3> #include <GuiImageList.au3> #include <GuiComboBoxEx.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("TrayMenuMode", 1) Opt("TrayIconHide", 1) Opt("GUIResizeMode", 1) Opt("TrayIconDebug", 1) Opt("TrayAutoPause", 0) Opt("GUIOnEventMode", 1) Opt("MustDeclareVars", 0) Opt("GUIEventOptions", 1) $hGUI = GUICreate("AutoIt Folder Color Menu", 300, 250, 200, 200) GUISetOnEvent($GUI_EVENT_CLOSE, "Quit") $hlabel = GUICtrlCreateLabel("Select a Color for the folders", 30, 10, 150, 17) $hButton1 = GUICtrlCreateButton("Change", 30, 200) GUICtrlSetOnEvent($hButton1, "Change") $hButton2 = GUICtrlCreateButton("Restore Thumbnails", 90, 200) GUICtrlSetOnEvent($hButton2, "Restore") GUISetState() Global $aRadio[16] Global $aApps[16][2] $aApps[0][0] = "White" $aApps[0][1] = "FoldersWhite.ico" $aApps[1][0] = "Black" $aApps[1][1] = "FoldersBlack.ico" $aApps[2][0] = "DarkBlue" $aApps[2][1] = "FoldersDarkBlue.ico" $aApps[3][0] = "Blue" $aApps[3][1] = "FoldersBlue.ico" $aApps[4][0] = "Brown" $aApps[4][1] = "FoldersBrown.ico" $aApps[5][0] = "Green" $aApps[5][1] = "FoldersGreen.ico" $aApps[6][0] = "Yellow" $aApps[6][1] = "FoldersYellow.ico" $aApps[7][0] = "Orange" $aApps[7][1] = "FoldersOrange.ico" $aApps[8][0] = "Red" $aApps[8][1] = "FoldersRed.ico" $aApps[9][0] = "Purple" $aApps[9][1] = "FoldersPurple.ico" $aApps[10][0] = "Violet" $aApps[10][1] = "FoldersViolet.ico" $aApps[11][0] = "Pink" $aApps[11][1] = "FoldersPink.ico" $aApps[12][0] = "Black-Blue" $aApps[12][1] = "Foldersb&blue.ico" $aApps[13][0] = "Black-Orange" $aApps[13][1] = "Foldersb&orange.ico" $aApps[14][0] = "Pdf" $aApps[14][1] = "FoldersPDFf.ico" $aApps[15][0] = "<Reserved>" $aApps[15][1] = "" For $i = 0 To 1 For $j = 0 To 7 $sName = ($aApps[($i * 8) + $j][0]) GUICtrlCreateIcon($aApps[($i * 8) + $j][1], -2, 30 + ($i * 160), 30 + ($j * 20), 17, 17) $aRadio[($i * 8) + $j] = GUICtrlCreateCheckbox($sName, 50 + ($i * 160), 30 + ($j * 20), 138, 20) Next Next Func Change() For $i = 0 To 15 If BitAND(GUICtrlRead($aRadio[$i]), $GUI_CHECKED) = $GUI_CHECKED Then If FileExists(@ScriptDir & '' & $aApps[$i][1]) Then $iMsgBoxAnswer = MsgBox(36, "Confirm", 'Do you really want to' & @CRLF & 'change to the folder: ' & $aApps[$i][0] & '?') Select Case $iMsgBoxAnswer = 6 ;Yes If ProcessExists('explorer.exe') Then ProcessClose('explorer.exe') EndIf RegWrite('HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced', 'IconsOnly', 'REG_DWORD', '1') RegWrite('HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerShell Icons', '3', 'REG_SZ', @ScriptDir & '' & $aApps[$i][1]) RegWrite('HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerShell Icons', '4', 'REG_SZ', @ScriptDir & '' & $aApps[$i][1]) ;ShellExecuteWait($aApps[$i][1]) GUICtrlSetState($aRadio[$i], $GUI_UNCHECKED) Case $iMsgBoxAnswer = 7 ;No EndSelect Else MsgBox(64, "File not found!", @ScriptDir & '' & $aApps[$i][1], 0) EndIf EndIf Next EndFunc ;==>Change Func Restore() RegDelete('HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerShell Icons', '3') RegDelete('HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerShell Icons', '4') RegWrite('HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced', 'IconsOnly', 'REG_DWORD', '0') If ProcessExists('explorer.exe') Then ProcessClose('explorer.exe') EndIf EndFunc ;==>Restore Do Sleep(500) Until $GUI_EVENT_CLOSE = 1 Func Quit() Exit EndFunc ;==>Quit Download Here Try it out and tell me if it works for you and how you would improve it! Greetz, Careca EDIT: code updated, download updated. UPDATE: Fixed problem when compiled .exe wouldn't find .ico files properly and abort the change.