#z:: ;Clear clipboard Clipboard = ;Copy selection and wait for it to get to the clipboard SendInput ^c ClipWait s := Clipboard ;Jumble words i := 1 Loop { i := RegExMatch(s,"P)[a-zA-Z]{4,}",l,i) If Not i Break Else Jumble(s,i,l) i += l } ;Put back in clipboard ClipBoard := s Return Jumble(ByRef s, pos, len) { ;Extract the middle letters l := len - 2 t := SubStr(s, pos + 1, l) ;Jumble the letters Loop { ;Get random number Loop { Random, r, 1, l i := NumGet(t, r - 1, "UChar") If i Break } ;Put the chosen letter in the next pos NumPut(i, s, pos + A_Index - 1, "UChar") NumPut(0, t, r - 1, "UChar") If (A_Index = l) Break } }