So what I originally had was a simple .jsx script that I would execute from the Scripts menu. It would take several minutes to run as it iterates several hundred times making modifications to text layers.
Works great in theory, but for some reason the script will randomly stop around the 20th, 50th, whatever iteration, usually with a SyncResult status of InvalidInputParams (which I have NO idea how that could happen, since it's calling the exact same function with no parameters each time, and the function is returns the same XML string each time, with just a different number indicating progress).
What host app? Why wouldn't you simply port the script to ActionScript?
Also, this is running CS4.