When navigating manually to !Folder_icons folder, this was not a problem, so I guess that something went wrong in SendInput, %Icon%. I tried various escape characters before the exclamation mark such as "`" and "\", to no avail, so finally had to use an underscore "_icons" in the folder name. It failed because Windows could not find "C:\SOFTWARE\older_icons\red_folder.ico". However, when I fed this filepath into the macro: Icon := "C:\SOFTWARE\!Folder_icons\red_folder.ico" I had previously prefixed some folders' names with an exclamation mark (e.g., "!Folder_icons" rather than "Folder_icons") to make them "float" to the top when sorted by name. I encountered one small problem along the way. It's important not to lose or move the _icons folder as the filepaths to these icons are absolute addresses. I also inserted a short delay after each Send to avoid hangups. I am running Windows 7, where the Properties window has 5 tabs. SendInput,r opens pRoperties window at General tab Here is my final version: Icon := "C:\SOFTWARE\_icons\red_folder.ico" Thanks TheDewd, apologies for missing your reply MouseMove, xPos, yPos Position mouse over next folder to have icon changed YPos := yPos 19 Y coord of next folder down in Explorer pane Click 414,158,2 Double-click 'Folder-Generic-Green' iconĬlick 414,178,2 Double-click 'Folder-Generic-Red' icon Click 414,138,2 Double-click 'Folder-Generic-Blue' icon Last used directory should open - this should contain your icons MouseGetPos, xPos, yPos Store mouse coordinates SetTitleMatchMode, 2 A window's title can contain the desired title Position mouse over center of icon of folder at top of list and press hotkeyĬoordMode, Mouse, Relative mouse coords relative to active window Also I have added a few delays to ensure it runs smoothly. This macro is a bit rough in that I have used constants rather than store values in variables, but the comments should explain it all. Also if either the folder (source) or the icon folder (destination) are moved so that the absolute filepath from one to the other changes, this macro is a very quick way of upgrading all folders affected by the change. I find this macro useful when I change my mind and decide to change all these folders to a different icon. If you do change the icon folder's location, you will need to Browse to the new location once, after which Windows should remember where it is and automatically go there with each loop iteration. Before running this macro, change one of the folder icons to the new icon manually, so Windows will remember which folder you selected when the macro runs. Note 2: When you Browse for a new folder, Windows opens another file directory folder, also named Change Icon for folder. If you notice it creeping, increment or decrement this value by 1 depending on the direction. The value by which yPos is incremented may vary from file manager to file manager, e.g., Explorer vs File Commander vs Directory opus. If you don't get it right, the mouse cursor may creep up or down with each iteration of the loop. Note 1: It's the vertical middle position which is important here, not the horizontal position. You may also need to adjust the cursor position, getting new coordinates from AHK's Window Spy. You need to set up a folder containing the icon(s) to be used, and ensure that this folder's location does not change. This script was designed to work with Windows 7 but should work with any Windows OS from XP onwards. Finally it moves your mouse down the Explorer pane to the next folder below ('A') and repeats the process. Within each loop the macro opens the folder's context menu, selects Properties, then the Customize tab, clicks the Change Icon button, then the Browse button in the next window (see Note 2), moves the mouse down to and selects the correct icon in your folder containing them, then closes all open windows in succession. To use this automated script, position the mouse cursor over the exact middle (see Note 1) of the top folder ('0-9') in Windows Explorer's folder pane, then press the macro hotkey. They are all within an enclosing folder.Į.g., the folder Software contains the following folders: I wanted them all to have the same icon (not the default Windows folder icon). I created a set of 27 folders, named from 'A' to 'Z' plus an extra folder named '0-9', to be used as placemark folders in my software catalog directory in Windows Explorer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |