• 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: truncating items in a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: truncating items in a list


  • Subject: Re: truncating items in a list
  • From: KOENIG Yvan <email@hidden>
  • Date: Tue, 11 Dec 2007 18:52:49 +0100

Hello

As sometimes the received dates aren't seen as dates by AppleScript,

I wrote this simple code:

set liste to every paragraph of (the clipboard as text)
repeat with i from 1 to count of liste
	set di to liste's item i
	set AppleScript's text item delimiters to " "
	set di to text item 1 of di
	set AppleScript's text item delimiters to " "
	set item i of liste to di
end repeat

set AppleScript's text item delimiters to return
set liste to liste as text
set AppleScript's text item delimiters to ""
set the clipboard to liste

starting from

13/12/07 18:29
14/12/07 18:29
15/12/07 18:29
16/12/07 18:29
17/12/07 18:29

the result would be:

13/12/07
14/12/07
15/12/07
16/12/07
17/12/07

Yvan KOENIG
_______________________________________________
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: 
 >Re: truncating items in a list (From: "Mark J. Reed" <email@hidden>)
 >Re: truncating items in a list (From: "Justin Laden" <email@hidden>)
 >Re: truncating items in a list (From: "Mark J. Reed" <email@hidden>)
 >Re: truncating items in a list (From: "Justin Laden" <email@hidden>)
 >Re: truncating items in a list (From: Skeeve <email@hidden>)
 >Re: truncating items in a list (From: KOENIG Yvan <email@hidden>)
 >Re: truncating items in a list (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: FileMaker 6 "not scriptable" under Leopard?
  • Next by Date: Re: persistence [Was: Re: difference between property and variable]
  • Previous by thread: Re: truncating items in a list
  • Next by thread: Re: truncating items in a list
  • Index(es):
    • Date
    • Thread