This is a request from the perspective of a language teacher and amateur scrabble player: I’d like to apply the current sorting and scrambling of a list to any highlighted text. The idea would be to (1) create an alphagram from highlighted text or (2) scramble it.
An interesting idea which needs a liitle more specification.
How to handle case of letters: preserve them, convert to upper/lower, or preserve capital positions?
e.g. Castle → aCelst or ACELST or Acelst ??
What about spaces between selected words and punctuation?
“tea time!” → “aee imtt!” ???
(Examples are for the sorted variation)
In the case of alphagramming, I think all letters should go to uppercase with punctuation at the end. Castle! → ACELST! This is the norm for the way alphagrams are trained by word game players.
In the case of randomization, the purist in me would want spaces and punctuation to be considered part of the randomized set. "tea time!” → “at emei!t”
However, I don’t think that’s useful/meaningful from a language teaching perspective, so more useful perhaps would be for spaces and punctuation to be maintained, and for each word to be alphagrammed/randomized individually. “tea time!” → “AET EIMT!” → “eta emit!”
Had a moment – see what you think of this: Alphagram — PopClip Extensions
Thank you so much for this. This is already great and will fit most of my use cases, and it will become a part of my workflow as a language teacher.
Although formatting and punctuation is being respected, currently the function considers all of the highlighted text as a part of the scrambled “set.” Would it be possible to consider spaces as the “set markers” instead?
For example, not “for example” → “AEE FLMOPRX”
but rather “for example” → “FOR AEELMPX”
I’m also noticing that the scrambled / alphagrammed text is going to my clipboard. Is there a way around that?
Ah yes, I see that makes more sense. I’ve updated it to work per word as you indicate. Now version 339 at the same link
Regarding the text going onto the clipboard, that’s actually a feature of PopClip. Whenever it replaces text, it always ends up on the clipboard. (This is so it’s consistent with the behavior when working with non-editable text, such that the resulting transform text is always dependably on the clipboard. )