Issue in a script between Mountain Lion and Mavericks

Hi folks, here’s my situation.

I have a script I wrote for Indesign CS6, At the beginning there is Dialog Box where user input the size of a rectangle.

set LargeurLivre to display dialog "Quelle est la LARGEUR du livre?" default answer ""
set Largeur to text returned of LargeurLivre as string

Let’s say the user input “5.5”

At another part of the script Indesign has to move the rectangle by “Largeur”, when it does move the box, where it says “-Largeur” the script round the number to 6 instead of leaving it at 5.5. See below.

What’s written.

move page item 1 by {-Largeur, 0}
move page item 2 by {Largeur, 0}
move page item 3 by {-Largeur, 0}
move page item 4 by {Largeur, 0}

the replies.

move page item 1 of page id 228 of spread id 213 of document id 3 by {-6, 0}
move page item 2 of page id 228 of spread id 213 of document id 3 by {"5.5", 0}
move page item 3 of page id 228 of spread id 213 of document id 3 by {-6, 0}
move page item 4 of page id 228 of spread id 213 of document id 3 by {"5.5", 0}

This is where my issue is coming.

I have 8 iMac’s here, only one of them use Maverick as OS, all the others have Mountain Lion installed. The script returns the right string only on Maverick (Applescript Editor 2.6.1 with Language 2.3.2). When I run it on the others, I have the problem explained above. Mountain Lion use (Applescript Editor 2.5.1 and Language 2.2.4).

My question is?
Can I upgrade the Applescript Editor to the latest version on Mountain Lion? Cause I really think this is where the problem is coming from. Any ideas to fix my problem would be very appreciate, I need this script to work well on every iMacs and so far, I don’t want to upgrade all the iMac’s to Maverick.

Thank you (sorry for the long post!)

Browser: Safari 534.57.2
Operating System: Mac OS X (10.8)

As your prompt is in French I wish to ask if you are running the system in French.
If it is, are you really answering 5.5 in the dialog ?
On a system running in French, “5.5” can’t be converted into a number by AppleScript itself.
Maybe there is a specific treatment in Indesign.
If the system is used in French, try to type “5,5” in the dialog and ask AppleScript to convert the string into a number out of the control of Indesign.

Yvan KOENIG (VALLAURIS, France) samedi 7 juin 2014 10:54:26

The system is in English, but I tried to put “,” instead of “.” but that didn’t work. Error message says that can’t make 5,5 into type number… (or something like that, I can’t remember!)

It’s kind of weird but for the things to work on both mac’s I had to change the equation to get the result I want.

Instead of

move page item 1 by {-Largeur, 0}

I changed for

move page item 1 by {Largeur - (Largeur *2), 0}

I guess that problem was coming from the variable coming right after the “-” but I have absolutely no idea why!!

If someone knows why it worked differently on 2 different systems, I’d appreciate to see it posted here.

If I have to upgrade all the macs to maverick to make sure my scripts are working the same on every mac than I’ll do it.

Thank you

What with :

move page item 1 by {0 - Largeur, 0}

Yvan KOENIG (VALLAURIS, France) mardi 17 juin 2014 11:27:47