I've had an issue with using icons in dialogs where the $scriptdir identifier is being processed as $mircdir sometimes and $scriptdir other times. The only way for me to get icons to work 100% of the time is to hard code the path into the script, which is unacceptable for releasing public scripts.