Are you sure all users are using the same units ?
and would it use different units for width to height? It's showing 3 sides correctly. And it only extends to the right in all cases.
Actually I just tried 2nd width value with variable only:
myTextBkg.geometricBounds = [myY-.05045, myX-.4102, myY+0.05045, myX+0.4102];
and it worked correctly. It looks like when I add 0.4102 to it, it adds few inches instead of 0.4102, like it's deducting it from document width.
I just tried it with +0 and it added same few extra inches to it:
myTextBkg.geometricBounds = [myY-.05045, myX-.4102, myY+0.05045, myX+0];
and I reassigned inches to document preferences:
myDoc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.inches;
myDoc.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.inches;
Still same thing.
I figured it out. The value for myX variable comes from dialog box, and it must be occasionally does not recognize it as numeric value, so it just guessing a number.
I added this to it:
myX = eval (myX);
And it's now working.
I was suspecting something like that but it was hard to assume without details
FWIW, you can easily convert strings to numbers without eval:
var myString = "1";
var myNum = Number( myString );
var myNum = parseFloat ( myString );