AppleScript to create spacing format like "S P A C I N G"?
AppleScript to Expand Text

The following AppleScript snippet adds a space between each character of a string. Copy and paste this code in Applications > Utilities > Script Editor to try it out:

set myText to "hello world"
set myResult to ""

repeat with c in every character in myText
    set myResult to myResult &amp; " " &amp; c
end repeat

display dialog myResult


Automator Service

Using this script, you can use Applications > Automator to create your context menu service.






Launch Automator.app
Create a new workflow, select Service
Add a Run AppleScript action
Copy and paste in the script:

on run {input, parameters}

    set myText to input as string
    set myResult to ""

    repeat with c in every character in myText
        set myResult to ((myResult &amp; " " &amp; c) as string)
    end repeat

    -- Convert to upper case using `tr`
    set myResult to do shell script "echo " &amp; quoted form of (myResult) &amp; " | tr [:lower:] [:upper:]"

    return myResult
end run

Select Output replaces selected text
Save and test your new service