Okay, so first, you want an alias for the "consenting" command, which will reset a table you will use to track the people, and turn on a trigger to capture the names, like so:
consent_tbl = {}
-- you can name the trigger whatever you want, but this has to match it exactly
enableTrigger("Consenting Names Trigger")
send("consenting")
-- you can name the trigger whatever you want, but this has to match it exactly
tempTimer(5,[[disableTrigger("Consenting Names Trigger")]]) -- this turns your trigger off after 5 seconds, so you don't get spurious matches
Then your trigger will capture the names, using a pattern like this: ^(\w+) is consenting you
table.insert(consent_tbl,matches[2])
Then whatever your dragging alias would look like this:
local cmd = matches[2]
for k,v in ipairs(consent_tbl) do
cmd = string.format("drag %s %s", v, cmd)
end
send(cmd)