Okay!
Spent the afternoon playing in AutoHotKey to make a script for a button that brings me through 3 windows to the File Picker Window! AHK is as much a must as Dopus so option keeps the task of changing a folder icon controlled, seemingly, by Dopus itself without opening another utility that I wouldn't be using otherwise.

The Dopus button code is...
@disablenosel:dirs
@dirsonly
@nodeselect
@admin
Properties
@sync:"C:\Users\%userprofile%\Documents\AutoHotkey\Lib\change folder icon via dopus.ahk"
// update the location & name of your `.ahk` script accordingly
// https://resource.dopus.com/t/command-for-changing-folder-icon/51924
The AutoHotkey Code...
I love AHK, thou it can be a pain in the butt! This is working 90% of the time, occasionally it will miss sending a ControlClick Input
which just stops it navigating thru the pop up windows.
Should anyone try to use this code you can the adjust the SetControlDelay, 70
and\or the sleep 200
delays between the actions to meet your systems speed needs.
also...
IMPORTANT!
The ControlClick
commands are sent to a Position coordinate measured in pixels, e.g. X172 Y54
, within the Properties Popup windows. I am on a 4k mointer with Windows DPI Scaling at 125%...
So these coordinates will likely have to remapped using AHKs Windowspy on your system for them to work!
I also left additional notes commented out in the script below.
#NoEnv ;recommened for performanc and compatiblity with futrure AHK releases.
#SingleInstance,Force
;#Persistent,Force
#warn ; enable warning to assist with decting common errors.
;#NoTrayIcon
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetTitleMatchMode 2
coordmode, mouse, window
SetControlDelay, 70
;If !A_IsAdmin
;Run *RunAs "%A_ScriptFullPath%"
; https://resource.dopus.com/t/command-for-changing-folder-icon/51924
; AHK has two syntax modes for sending ControlClick, naturally windows and\or ahk couldn’t play together using just one mode
; I had to mix them to navigate the changeing of tabs & pops up, both modes examples are here for reference if the scripts decides to break itself.
; syntax for
; ControlClick, Control-or-Pos, WinTitle, WinText, WhichButton, ClickCount, Options, ExcludeTitle, ExcludeText
sleep 850 ; waits for Dopus to open the Properties Window
#IfWinExist , Properties ahk_class #32770 ahk_exe dopus.exe
; mode 1
ControlClick, X172 Y54, Properties, , Left, 1, na ;*works
; mode 2
; ControlClick, SysTabControl321, Properties, , Left, 1, X165 X14 na
sleep 400
; mode 1
; ControlClick, X116 X426, Properties, , Left, 1, na
; mode 2
ControlClick, Button7, Properties, Change &Icon..., Left, 1, na ;*works
sleep 400
; mode 1
ControlClick, X286 Y84, Change Icon for, , left, 1, na ;*works
; mode 2
; ControlClick, Button1, Change Icon for, &Browse..., left, 1, na
sleep 400
; Send ^v ;Uncomment if you've set yourself up to have a `.ico` file path waiting in your clipboard
; Return
ExitApp
; No need for #Persistent or Return. The script will only run once then exit after these lines execute.
; If you copy this piece of code into a #Persistent Script uncomment the Return & delete the ExitApp
Best Luck!
X
UPDATE ;*************************
I found a way to incorprate this script into my main AutoHotkey Script by assigning it an odd hotkey F16
, replased the ExitApp with a Return then in the Dopus Button I added... @sendkey:F16
.
@disablenosel:dirs
@dirsonly
@nodeselect
@admin
Properties
@sendkey:F16
//@sync:"C:\Users\CLOUDEN\Documents\AutoHotkey\Lib\change folder icon via dopus.ahk"
Dopus and AHK are too much fun!

UPDATE 03-10-2025
Forget about this old janky scipt.
I wrote a whole new script\app with a GUI that has bells & whistles and dopus integration.
i posted about here.... Change Folder ICO