I have had a first stab at the script, below. It uses a file to store the shortcuts and command [descriptions]. You should be able to see from the script annotations how to add a new one. (I populated 1-4 with real data, but got lazy after that, so you have a few placeholders to work with first.
As I have noted, once you are happy that you have all the data in the file, you can comment out part of the script for ongoing use. (BTW, my reluctance to use Excel is that I don't currently have it installed and I don't want to offer wrong advice. If you have Numbers, I do have that and could probably modify to work with a spreadsheet from there. This might be especially useful if you have the data already sitting in Excel.)
A few things came-up whilist I was writing the script:
1. Currently, all recipients will not only get the same tip at the same time, but they will see the names and email addresses of the others who receive them. It is possible to modify this.
2. I have added a property gRandomCheck which keeps track of which shortcut has already been used (since the last time the script was compiled. This will prevent the same tip being sent more than once. When all tips have been sent once, the script will alert you and not send anything until reset. It does not check on a per-addressee basis (which would be a refinement). (If you add a new addressee at this stage, the whole process will start again, and you may not really want this to be the behaviour.)
3. The way that I have built the list, commandList, is deliberately cumbersome - it's for the sake of clarity. If you prefer, you can construct the whole list as {{shortcut:"X", command:"X"}, {shortcut:"Y", command:"Y"}}
Have a look - I am sure you will have questions!
SCRIPT STARTS HERE Paste the following lines (thru the end) into a new AppleScript Editor document and press RUN
--The property gRandomCheck persists between runs and is used to stop sending the same hint twice.
property gRandomCheck : {}
--I am defining a file on the desktop. It doesn't have to be in this location
set theFolder to path to desktop
set commandFile to (theFolder as text) & "CommandFile.csv"
--
--(* Unless you need to change the file contents you do not need to write to it each time. Remove the "--" on this line and before the asterisk about 18 lines below
--Follow this format and enter as many records as you like on a new line - each with a unique name
set record1 to {shortcut:"Z", command:"Undo"}
set record2 to {shortcut:"R", command:"Record"}
set record3 to {shortcut:"⇧R", command:"Record Toggle"}
set record4 to {shortcut:"⌘.", command:"Discard Recording & Return to Last Play Position"}
set record5 to {shortcut:"X", command:"x"}
set record6 to {shortcut:"X", command:"x"}
set record7 to {shortcut:"X", command:"x"}
set record8 to {shortcut:"X", command:"x"}
set record9 to {shortcut:"X", command:"x"}
set record10 to {shortcut:"X", command:"x"}
set record11 to {shortcut:"X", command:"x"}
set record12 to {shortcut:"X", command:"x"}
set record13 to {shortcut:"X", command:"x"}
--
--Make sure you add the record name before randomCheck:
set commandList to {record1, record2, record3, record4, record5, record6, record7, record8, record9, record10, record11, record12, record13}
--
--This part writes the above records to the file each time.
set fileRef to open for accesscommandFile with write permission
set eof of fileRefto 0
writecommandListtofileRefstarting ateofaslist
close accessfileRef
--
--remove "--" here to stop writing (see above)*)
--This reads from the file
set fileRef to open for accesscommandFile with write permission
set commandList to readfileRefaslist
close accessfileRef
--
--Here's where the random record is chosen
set selected to 0
if (count of gRandomCheck) is not (count of commandList) then
repeat
set selected to (random number from 1 to (count of commandList))
if selected is not in gRandomCheck then
set gRandomCheck to gRandomCheck & selected
exit repeat
end if
end repeat
else
display dialog "You have sent all shortcuts to all recipients once. Recompile to reset"
return
end if
--
--This is setting-up the format of the mail contents
set messageText to ("Shortcut: " & shortcut of recordselected of commandList & return & "Command: " & command of recordselected of commandList)
--
tell application "Mail"
--When you're ready to use, you probably will not want Mail popping to the front, so add "--" before activate
activate
--You can change the subject of the message here. You can also set visible:true to visible:false when you are happy all is working OK
set theMessage to (make new outgoing message with properties {visible:true, subject:"Today's Logic Pro Shortcut", content:messageText})
--
tell theMessage
--You can add new recipients here. Just add a new line. Modify the names and addresses here to real ones
make new to recipient with properties {name:"Fred Smith", address:"freds@wizxzy.com"}
make new to recipient with properties {name:"John Smith", address:"johns@wizxzy.com"}
--
--When you are ready to start sending, remove the dashes before "send" below
--send
--
end tell
end tell