• 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: tab delimiter problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tab delimiter problem


  • Subject: Re: tab delimiter problem
  • From: Brian Christmas <email@hidden>
  • Date: Sat, 06 Aug 2011 17:43:13 +1000

G'day Shane

Thanks, but something weird was going on.

If I saved as a .txt file, extra tabs seem to be being added, so item 2 of theEntries was seen as '"

If I saved as a plain file without an extension, item 2 of theEntries was seen as a date, which is correct.

I copied and pasted the saved text from the .txt file into Pages, and showed invisibles, and extra tabs showed up.

However, I removed every instance of 'tab' from my script where it was building the list of saved items, then retyped them in, and now I only get one tab between each item. And it's working fine, thanks.

Regards

Santa


On 06/08/2011, at 4:46 PM, Shane Stanley wrote:

> On 6/8/11 3:53 PM, "Brian Christmas" <email@hidden> wrote:
>
>> Is there something wrong under 4.1 and lion?
>
> I don't think so.
>
>>             set theEntries to paragraphs of (read theFiletemp as text)
>>            set oldDelims to AppleScript's text item delimiters
>>            set AppleScript's text item delimiters to {tab}
>>        repeat with  anEntry  in theEntries
>>            say count of theEntries
>>            say count of anEntry
>
> That last line is always going to count the number of characters in anEntry.
> Perhaps you mean "count of text items of anEntry".
>
> --
> Shane Stanley <email@hidden>
> 'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> applescriptobjc-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: tab delimiter problem (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: tab delimiter problem
  • Next by Date: Table checkboxes problems.
  • Previous by thread: Re: tab delimiter problem
  • Next by thread: Table checkboxes problems.
  • Index(es):
    • Date
    • Thread