I think what you need is a tool (should exists if I remember right) that can read tooltypes from icon files. If the script is in ARexx you can use rexxtricks.library for example that can handle tooltypes.
Haven't tried but there could be a problem left. The icon file might be locked during execution and therefore no access to it. But try it.