一鍵統(tǒng)計(jì)所選內(nèi)容字符數(shù)[Mac]

Mac OS X Hints分享了利用右鍵快捷按鈕一鍵統(tǒng)計(jì)所選內(nèi)容字符數(shù)的?Automator 腳本,內(nèi)容如下:[下載安裝版]

on run {input, parameters}
    try
        set MyText to input as string
        set NombreSignes to the number of characters of MyText
        set NombreMots to the number of words of MyText
        set NombrePara to the number of paragraphs of MyText
        set LeResultat to "The selected text contains :" & return & "- " & NombreSignes & " sign(s) ;" & return & "- " & NombreMots & " word(s) ;" & return & "- " & NombrePara & " paragraph(s)."
        display dialog LeResultat buttons {"OK"} default button 1 with icon note
    on error errmsg number errnum
        display dialog errmsg & " [" & errnum & "]" buttons {"OK"} default button 1 with icon stop

    end try
    return input
end run

此版本僅為法語顯示,如果你想要英文版的,可以到這里參考一下方法

評論