Add a shortcut action for 'Copy a New Unique ID'

It would be useful to me if Copy a New Unique ID had a shortcut action.

1 Like

here’s some AppleScript that can be saved as an app for which a launcher shortcut can be created. AppleScript can also be leveraged in Shortcuts. I can’t recall if I wrote this or just adapted it way back.

set res to ""
set n_of_tokens_to_do to 4
set length_of_tokens to 5
set n_tokens_done to 0
repeat n_of_tokens_to_do times
	repeat length_of_tokens times
		if (random number from 0 to 1) = 0 then
			set res to res & ((random number from 1 to 9) as Unicode text)
			set res to (res & (some item of "ABCDEFGHIJKLMNOPQRSTUVWXYZ"))
		end if
	end repeat
	set n_tokens_done to n_tokens_done + 1
	if n_tokens_done ≠ n_of_tokens_to_do then
		set res to (res & "-")
	end if
end repeat
set the clipboard to res

Awesome. That’ll do it. Thanks a lot @LucB

1 Like