I’m hoping to learn from the pros:
In the following script, I can construct the name of the list but can’t figure out how to tell AppleScript I’m referring to a list and not a string:
set email_list to {"someone@somewhere.com", "anotherone@elsewhere.com"}
-- setup lists:
set a_list to {}
set s_list to {}
------------------------------------------------------------
-- SORT THE LIST OF EMAIL ADDRESSES:
repeat with this_address in email_list
-- get the first letter of this_address:
set first_letter to character 1 of this_address as string
-- set the correct list to look into:
set correct_list to first_letter & "_list" as string
log "correct_list is:"
log correct_list
-- ******************************
-- HOW CAN I REFER ABSTRACTLY TO A LIST?:
copy this_address to end of my correct_list -- AS sees correct_list simply as a string
end repeat