Word Count, but only words over certain number of letter...?

Hi,
Does anyone know of a way to do a word count, but only count the words with a certain number of letters. For example all words with 4 letters or more?
Thanks

I never guessed that I will read such a question but why not ?
--(SCRIPT word4Count.app]
--==========
Enregistrer le script en tant qu'Application ou Progiciel : word4count.app
déplacer l'application créée dans le dossier
<VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Pages:
Il vous faudra peut-être créer le dossier Pages et même le dossier Applications.
menu Scripts > Pages > word4count
Le script affiche (ou insère à l'emplacement du curseur )
le nombre de mots de la couche texte et
le nombre de mots des blocs texte
dont la longueur est supérieure à la valeur définie par la property limite.
--=====
L'aide du Finder explique:
L'Utilitaire AppleScript permet d'activer le Menu des scripts :
Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
Cochez la case "Afficher le menu des scripts dans la barre de menus".
--=====
Grace au programme gratuit ThisService, il est possible d'encapsuler ce script dans un service.
Télécharger ThisService depuis:
http://wafflesoftware.net/thisservice/
Lors de la création du service, cliquer le bouton "Produce output".
Il est possible d'associer un raccourci clavier au service.
--==========
Copy the script in the clipboard
Paste in a blank window of Script Editor
Save it as an Application or an Application Bundle
Move the newly created application into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Pages:
Now, enter your Pages document.
Click where you want.
Go to
menu Scripts > Pages > word4count
The script will count the words whose length is higher than the value stored in the property limite.
The wordcount will be pasted at the insertion point
--=====
The Finder's Help explains:
To make the Script menu appear:
Open the AppleScript utility located in Applications/AppleScript.
Select the "Show Script Menu in menu bar" checkbox.
--=====
Thanks to the free program ThisService, we may encapsulate this script in a Service.
Download ThisService from
http://wafflesoftware.net/thisservice/
When creating the service click the button "Produce output"
We may link the service to a shortcut.
--==========
Yvan KOENIG
19 février 2009
--=====
property limite : 4
property affiche : true
--=====
property theApp : "Pages"
property ws : {}
--=====
on process()
set rezult to my commun()
tell application "System Events"
activate
display dialog rezult
end tell
return ""
end process
--=====
on commun()
local liste1, liste2, ng, c1, c2
--set my ws to {}
tell application "Pages" to tell document 1
set liste1 to words of body text
set liste2 to {}
set ng to count of graphic
repeat with i from 1 to ng
tell graphic i
try
copy items of (get words of object text) to end of liste2
end try
end tell -- graphic i
end repeat
(* Working this way we are counting the words as they are defined by Pages *)
end tell -- document 1 of Pages
if liste1 is not {} then
set my ws to liste1
set c1 to my compte4()
else
set c1 to 0
end if
if liste2 is not {} then
set my ws to liste2
set c2 to my compte4()
else
set c2 to 0
end if
set my ws to {}
if my parlefrancais() then
return "Nombre de mots dont la longueur dépasse " & limite & return & "dans la couche texte : " & c1 & return & "dans des blocs : " & c2
else
return "Count of words whose length is greater than " & limite & return & "in text layer : " & c1 & return & "in text blocks : " & c2
end if
end commun
--=====
on compte4()
local wc, w
set wc to 0
repeat with w in my ws
if length of (w as text) > limite then set wc to wc + 1
end repeat
return wc
end compte4
--=====
on parlefrancais()
local z
try
tell application theApp to set z to localized string "Cancel"
on error
set z to "Cancel"
end try
return (z = "Annuler")
end parlefrancais
--=====
on run
set rezult to my commun()
if affiche then (*
display the results *)
tell application theApp to display dialog rezult
else (*
insert the results in the text body *)
tell application "Pages" to tell document 1 to set selection to rezult
end if
end run
--=====
--[/SCRIPT]
Yvan KOENIG (from FRANCE jeudi 19 février 2009 15:45:56)

Similar Messages

  • I've lost/misplaced my iPhone 4s but only have the serial number to work with. How do i find it?

    Hello, I've lost my iPhone 4s which is black, contains 16gb and cracked screen. I have been looking in and out of the internet. Since i found my serial number can i somehow locate the phone? I know the app Find my lost iPhone. But only problem is i didnt connect it to my iphone when i had it. Its technically not my phone anymore (use it for my ipod)
    HELP asap please
    J

    If you did not activate Find my iPhone then you've truly lost it. Unless, of course, you or someone else finds it? There is no way using the serial number and before you ask the IMEI number.

  • My Podcast Only Shows a Certain Number of Episodes on the iTunes Store

    Hello,
    I have 49 episodes in the itunes podcast store, but only the last 25 episodes come up.  What do I do?  It's under the Ecstasy Radio Podcast.
    Sincerely,
    Eddie Makabi

    Hi rodger.. i see on these forums you seem to be the most knowledgeable around here regarding podcasts and the submission process.. im having an absolute nightmare with mine.
    I use podcast maker and getting a new podcast on itunes is no problem..but I cant add new episodes to the existing podcast.. every time I try I get the message “the feed has already been submitted”
    I looked through the forums and seen that changing the name of the podcast will work.. but all this does is add a new podcast.. which means Its an brand new podcast so im back to square one with no subscribers! I currently have tried several things which means I have uploaded 4 or 5 versions of the same podcast all with slightly different title names... but they are all no use to me.. I need to keep the original one has it has so many subscribers..
    I simply just need to add the new episode to this.. buts its proving impossible for me.. 3 months now iv been trying with this
    Im really stuck with this ..can you help mate?
    chris

  • My iphone 5 only stores a certain number of dialed numbers , any way to make it store more numberS?

    Like when I was using my old samsung , if i dial a number from a 2 weeks ago , im able to retrieve it from the dialed numbers , its not gone , but with iphone only a few days and poof they disappear , any idea how to stop that?

    Recents is limited to exactly 100 calls, independent of whether they are assigned to a contact or not.  No way to change that.
    You can delete recent calls you don't care about to keep the list from filling up.  Swipe across the call and press the Delete button or use the Edit button, top right.

  • Seems my 4S will only accept a certain number of Favorite phone numbers.. How to add more????

    Is there a fix for the seemingly fixed number of phone number favorites in my 4s??  I can add a favorite only if I delete an existing favorite.. Thanks, Bruce 233

    Recents is limited to exactly 100 calls, independent of whether they are assigned to a contact or not.  No way to change that.
    You can delete recent calls you don't care about to keep the list from filling up.  Swipe across the call and press the Delete button or use the Edit button, top right.

  • When I view music on my ipad2 that has been synced from itunes on my computer, why does it only display a certain number of songs?

    My itunes on the ipad only shows 63 songs. I have over 600 songs in my itunes on my computer.

    You probably purchased those songs on your iPhone and never transferred them to your computer. You can do so by following these instructions:
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer

  • I have installed Lightroom 5, but only have a licence number.  Where do I put this number in order to register my softward.

    The Lightroom was purchased through an organisation that is why I have a licence number.  I have e-mailed the organisation, but of course they haven't got back to me yet.
    I can open my software as it is asking me for a serial number which I don't seem to have as it wouldn't accept the codes on the box.
    Help!!!

    Hi Heather,
    The license key or the serial number is one and the same thing. It is a 24 digit number which is required to activate your software.
    In order to register your product, please visit the link below.
    Register your product
    Regards,
    Anand

  • HT5622 On Itunes when I listen to my music I can't turn up the volume at all it's on but only at a certain level I turn it up any higher. On my computer i can turn up the volume but not on i tunes even if I click it to be higher i goes back.

    the volume for i tunes wont change it stays at a constant volume it wont let me turn it up or down. I can pause though.

    How are you trying to play them, in the iTunes store or the Music and Videos apps ? Downloaded and synced music and videos should be in the Music and Videos apps, and you can stop content that is only in the cloud from showing in them via Settings > iTunes & App Store > Music and Videos 'off' (under the 'show all' heading).
    If you don't have your music and films/TV shows in those two apps then you should be able to download them into those apps via the Purchased tab in the iTunes store app.

  • Installing LR 5 on my new mac, but only have upgrade serial number.  How can I find my previous LR serial number?

    I cannot find my previous version serial number.  How can I locate?

    Did you pass code locked it? If Find My iPhone is configured, you can do a remote wipe. Any way, go to the police and make a report, change your password in iTunes Store, really sorry, that's not much you could do. Is it authorize? If so you can deauthorize in iTunes when you select iTunes Sore under STORE (left panel) and click your Apple ID (top right)

  • Unexpectdly Quit!  But only while opening certain specific projects

    I'm trying to do a demo real for an interview tomorrow and for the first time in my history with it, Final Cut will not open. It loads the most recent project (the one I want to open) to 6% and then unexpectedly quits. If I try to open FCP after a fresh boot it will open up to a new project, but then if I try to open the project I want, it loads to 6% and then gives the unexpectedly quit message again. If I try to open a smaller project, that project will open fine. But the ones I need, Nothing. I'm pulling this data from a Lacie 250 external Hard Drive, that very coincidentally, I had linked up to my schools FCP system just hours ago. I've searched the forums and tried some suggestions to no avail. Anyone seen this before?

    Can you open the project with the media offline? Could it be a corrupt render? Can you open the project as a different user? Unfortunately, it could simply be a corrupted project - do you have any autosaves? Is the revision of FCP at school different than that at home?
    Patrick

  • Finance charges on amounts outstanding over certain number of days

    We are implementing Finance charges in AR.
    We have a specific requirement that the finance charges need to be calculated on all invoices outstanding above 120 days.
    Presently when I run statements Finance charges are calculated from the due date to the statement date.
    is there a specific way for this or a workaround
    Thanks
    Ninad

    Ninad,
    I just peaked into this, looks complicated. We also have a requirement (not about the finance charges) to something about this statements.
    If I find a way, I will post that here.
    Thanks
    Nagamohan

  • My PE12 only has a limited number of filters, some are a white-out.

    Some filters do not display. For example I use Sketch quite a bit but filters like Photocopy appear as a plain white screen. I've not counted but only about two thirds seem to be working. Any ideas anyone? {Windows 8.1, 8 Ram and separate graphics card} Thanks.

    Some of the filters like under Sketch need two different colors in the toolbox.
    That is the Foreground and Background colors need to be different.
    Try pressing the D key to set the default colors of Black foreground and White background and see if the filters work any better.

  • On Pages 09. Error Message "Missing Font" - text on all my files/Documents has disappeared. I know it is still there from the word count - but it is invisible. Any clues Gratefully received.

    On Pages 09. Error Message "Missing Font" - text on all my files/Documents has disappeared. I know it is still there from the word count - but it is invisible. Any clues Gratefully received.

    What version of Pages '09?
    Have you updated it to the latest iWork '09 v4.3?
    Peter

  • HT2506 I am trying to convert  word document to a PDF but only half the document accurately converts. Is there a way to fix this?

    I am trying to convert  word document to a PDF but only half the document accurately converts. Is there a way to fix this?

    I have found that complicated document structures causes Word to split the document into parts, but I've always gotten the whole thing, in multiple documents.
    However, with two pages, I can't imagine it is that complicated.
    Any odd fonts or paragraph styles?

  • I am trying to subscribe so that I can convert PDF to word. Get so far but only options for address are in USA, I live in England

    I am trying to subscribe so that I can convert PDF to word. Get so far but only options for address are in USA, I live in England

    Hi golfgerald,
    I'm sorry that you're having trouble subscribing. Please take a look in the lower-left corner of the Adobe.com website. Do you see "United Kingdom" listed as the region? If not, please click Change Region, and then choose United Kingdom.
    Did that do the trick?
    Best,
    Sara

Maybe you are looking for

  • USB instruments on ipad GarageBand?

    What tool do I need in order to plug in USB microphones and drums into the ipad. I got a generic camera connection kit but it doesn't seem to work. Someone point me in the right direction please. Thanks?

  • Query View not available as DataProvider in Report Designer

    Hi experts, I am unable to find any query views when I tried to insert DataProvider in Report Designer. All that is available in InfoAreas view is only queries. When I tried to restrict type to only Query View, they are only visible in History view a

  • Link GRN with Service Invoice

    Dear Freinds I am making a GRN ,for this GRN i need to pay to the transporter who  is a third party...my problem is that how do i link that payment with that GRN because the transporter  is not my regular vendor. Please help best regards anand

  • P2V Server using Bootable media

    I have a server that cannot boot fully into Windows. I want to boot off a CD and create a VHD of the server on a USB drive or network drive. I'm hoping someone can point me in the right direction of how I can do this quickly and easily. Vincent Sprag

  • OUTER JOIN behaviour

    Hi, I have a Fact table which is joined with two Dim tables: FACT -----DIM1 (FACT.key_col1= DIM1.key_col(+) ) \__DIM2 (FACT.key_col2= DIM2.key_col(+) ) Logical column: col1 = DECODE(DIM2.val, 0, DIM2.desc, DIM1.desc) In the business model: FACT >----