Page 1 of 1

formatting

Posted: Mon Oct 20, 2008 9:04 pm
by Glenn Boyce
How do I set the numberfunction for dollars to have a comma between thousands i.e. 10,000,000.00

Posted: Mon Oct 20, 2008 10:24 pm
by Mark
I haven't tested it, but this script might help:

http://thread.gmane.org/gmane.comp.ide. ... .user/1599

I don't believe you can do this (easily) with format or numberFormat.

Best,

Mark

Posted: Tue Jan 27, 2009 2:03 am
by novarcproducts
Hello Mark,
the function linked above works very well for a "Ask" & "Answer" senario.
Can you tell me what the "Mouseup" script would be to retrieve the number to be converted from a field without using the "Ask" or "answer" commands? Sorry for such a simplistic question.
Thanks,
Ron

Posted: Tue Jan 27, 2009 10:05 am
by Mark
Hi Ron,

Your script would look like this:

Code: Select all

on mouseUp
 put fld "Some Number" into myNumberVar
  if myNumberVar <> "" then put "$"&dispnum(true,myNumberVar) into fld "Another Number"
end mouseUp
Best,

Mark

Posted: Wed Jan 28, 2009 4:21 am
by novarcproducts
Thanks Mark.
Your help is very much appreciated,
Ron