Hello,
I have a script that works pretty well. It interrogates a Quark file, and writes the information into an XML file. There is though a little bug that is a trifle annoying. Sometimes it works fine, and at other times it doesn’t.
This statement should produce a string something like ‘top justified’.
set strValue to coerce (vertical justification as string) to string
However for reasons best known to itself it often produces a string with this value ‘«constant ****TPJS»’.
When I put in a display dialog statement to try and debug it will sometimes display this second value, but when I press cancel it seems to switch back to the one I want. I’ve ran my script several times on different Quark files sometimes it works, and sometimes it doesn’t. It isn’t throwing an error if it did strValue is set to empty. It is without a try block but this contrary behaviour is puzzling me.
I’m guessing that might be something to do with the cast. I’ve tried various versions of the statement, all seem to work sometimes.
Any help or advice would be much appreciated.
Dan.