Deleting panding message by name
Posted: Tue May 13, 2014 4:02 pm
I didn't find this method explained, but it's very useful. You can delete pending message by name, without recording message id. For example the following code cancel all pending messages named "myMex":
on cancelmessages
repeat for each line templ in the pendingmessages
if item 3 of templ is "myMex" then
put item 1 of templ into temp
cancel temp
end if
end repeat
end cancelmessages
on cancelmessages
repeat for each line templ in the pendingmessages
if item 3 of templ is "myMex" then
put item 1 of templ into temp
cancel temp
end if
end repeat
end cancelmessages