so I came up with this script, and it worked fine until I tried it on a different file. I have moved the artboard around all over the "main" canvas (if that is what it is called) and on the one that it works on, seems to only work when artboard(top, left) is positive values. however on the new file it doesn't seem to matter where it is on the artboard, it wont work anywhere. it should find the textpath relative to the shapes position.
I thought it was the coordinateSystem, but that doesn't seem to fix it. any ideas would be greatly appreciated. been banging my head against desk for about a week on this one. I have an feeling it might be because I am not understanding how the canvas works (maybe the math.abs(); are bad idea?)
threw it up on gist because it was pretty big: https://gist.github.com/2951981
Since CS4, the coordinate system's 0,0 point is at the upper left of the artboard. X is positive to the right and Y is positive down. It used to be that the origin was a Cartesian one with 0,0 at the lower left and positive Y was up but since Photoshop and a lot of other software (mostly for images work) work from the upper left, Adobe decided to change AI to match. There are now global and artboard rulers as well to further confuse the issue. Hope this helps.
ok so maybe I am getting confused. so there is app.coordinateSystem as well as something else I have to set? It doesn't seem 0,0 is upper left because when I set canvas to 0,0 it brings it to center...? and when I print return values it gives me negative for Y if it is below the 0,0 point.