IconEx

Advanced icon dialog

This is advanced version of system dialog <CmnDlg_Icon>.  With Icon, you can only open icon from file resource while this dialog allows you to move trough file system folders and use anything as an icon.  Furthermore, icon resource can be entered like it is a folder.  If file is the icon resource, its name will have “>” at the end and you can open it.

Dialog is modal, meaning that your script will stop until dialog is closed.  Additionally, you can pass configuration file (ini) when opening dialog to let it store state information in IconEx section, like dialog position and size, last folder/file that was open, etc.

Dialog is resizable, and have support for filters and icon size.

(see IconEx.png)

Summary
IconExAdvanced icon dialog
IconExOpen the dialog.
About

IconEx

IconEx(StartFile = "",
Pos = "",
Settings = "",
GuiNum = 69)

Open the dialog.

Parameters

StartFileFile or folder to start with.  By default empty it means that shell32.dll will be used unless you set Settings and IconEx was previously used (so it saved previous session).  If you specify file that is not an icon resource, its parent folder will be open and file will be selected.  If file is icon-resource (like shell32.dll) it will be open.  You can specify file index to be selected after the file name separated by “:” (shell32.dll:125)
PosPosition of gui in AHK syntax.  By default empty, dialog will start at screen center, unless there is saved position of previous session (if Settings is set)
SettingsPath of the ini file that will be used to store session information.  Data is saved in IconEx section.  If this file already exists with valid session information, those will be used to set Pos and StartFile if they are left empty.
GuiNumGUI number to be used by the dialog, by default 69.

Returns

Path of the selected icon.  If icon is in icon resource, its 0 based index is specified after the file name with “:” as separator, for instance shell32.dll:12.

Remarks

Default window will be set as the parent of the dialog.  Use Gui N:Default to set the correct parent before calling this function.  Parent will be disabled while the dialog is active.  Dialog will not change the Default Gui.

User can set relative paths in the file name field of the IconEx GUI, for instance “..” to open a parent folder.  If StartFile is empty, shell32.dll will be open, the same as in standard Icon dialog.

Hotkeys

BackspaceGo to the parent folder.
EnterEnter folder or icon resource.
IconEx(StartFile = "",
Pos = "",
Settings = "",
GuiNum = 69)
Open the dialog.
Close