• 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: Count of Tab characters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Count of Tab characters


  • Subject: Re: Count of Tab characters
  • From: Bill Planey <email@hidden>
  • Date: Tue, 23 Jan 2001 10:09:53 -0600

Where does one get MacPerl, and what is it?

Thanks,

Bill Planey


>-- mixing in a little MacPerl will help the speed
>
>tell application "Microsoft Word"
> activate
> do Visual Basic " Selection.WholeStory"
> copy
>end tell
>set wordText to the clipboard
>tell application "MacPerl"
> Do Script ["
>$count = ($ARGV[0] =~ tr/ //);
>MacPerl::Reply($count);
>", wordText]
>end tell
>set countTabs to result
>
>-- hcir
>mailto:email@hidden
>
>
>> This proves surprisingly slow, 25 seconds to do a 48 page/944 tabs document
>> OMM, including trying to speed things up by turning screen updating off.
>>
>> tell application "Microsoft Word"
>> do Visual Basic "Application.ScreenUpdating = False
>> theNumber = 0
>> With Selection.Find
>> .Text =\"^t\"
>> .Wrap = wdFindStop
>> Do While .Execute = True
>> theNumber = theNumber + 1
>> Loop
>> End With
>> Application.ScreenUpdating = True
>> MsgBox theNumber & \" tabs in this document\""
>> end tell
>_______________________________________________
>applescript-users mailing list
>email@hidden
>http://www.lists.apple.com/mailman/listinfo/applescript-users


Bill Planey

3311 Oak Lawn Ave., Suite 300
Dallas, TX 75219 USA

email@hidden
214-528-5990 voice
214-521-8536 fax
214-557-2655 mobile


  • Follow-Ups:
    • Re: Count of Tab characters
      • From: David Wignall <email@hidden>
  • Prev by Date: Re: "Next" in Repeat?
  • Next by Date: Good uses for Apple Data Detectors
  • Previous by thread: Re: Count of Tab characters
  • Next by thread: Re: Count of Tab characters
  • Index(es):
    • Date
    • Thread