Here's a script to get you started. You'll need KiXforms registered.

This script will load the contents of $sFolderToDisplay into a window, and attempt to associate the icons (which is gets mostly right ).

If you double click on an icon then a message is displayed to the console giving the command line associated with it.

I'll leave you to sort out the form details, the icon sizes and the actual command execution.

Code:

.
See newer version later in thread
.