Kathy,
The scripting language does not have any kind of logic capabilities for doing something based on something else. I think your best bet would either be what you described earlier (i.e. export out a PRJ file from a script, then read it back in, generate a new script, then run it), or to use the Global Mapper SDK to load your data file, query the projection, then export a new file with the desired projection/datum. See the Developers page at
GLOBAL MAPPER for more details on the SDK.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com