• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Formatting question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Formatting question


  • Subject: Re: Formatting question
  • From: "Mark J. Reed" <email@hidden>
  • Date: Fri, 20 Apr 2007 10:29:17 -0400

On 4/20/07, KOENIG Yvan <email@hidden> wrote:
set DNGnumber to "DNG" & text -3 thru -1 of ("000" & DNGnumber)

That works through DNG999, but truncates numbers >= 1000 to the last three digits, which is not necessarily what Chris wanted; his code didn't do that.

I would use the Satimage OSAX for numeric formatting like this.  If I
couldn't ensure that was installed everywhere it needed to be, then
I'd probably call out to the shell:

set DNGnumber to do shell script "printf DNGd " & DNGnumber


-- Mark J. Reed <email@hidden> _______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Formatting question (From: Chris Waldrip <email@hidden>)
 >Re: Formatting question (From: KOENIG Yvan <email@hidden>)

  • Prev by Date: Re: Formatting question
  • Next by Date: Quark crash with duplicate command
  • Previous by thread: Re: Formatting question
  • Next by thread: Re: Formatting question
  • Index(es):
    • Date
    • Thread