addxml send won't allow multiple quotations?

Posted by Grimvald on Sun 11 Jul 2021 10:27 PM — 3 posts, 11,543 views.

#0
I'm trying to make a trigger that will have a hyperlink in the 'send' box. When I do this:

addxml.trigger { match = "You still have to kill * %2 *",
regexp = false,
['repeat'] = true, -- repeat is lua keyword
send = "Hyperlink ("mgt %1", "kill %2", "click", "yellow", "%3", 0)",
sequence = 50,
enabled = true,
send_to = sendto.script,
group = "cpclix",
}

I am getting errors on the 'send' line because of the extra quotes. When I remove the quotes the trigger generates, but is not a hyperlink.

Thanks in advance!
Australia Forum Administrator #1
In Lua you can use single quotes inside double quotes or vice-versa. So for example:


print ("Nick says 'hello' to you")


In your case it would be:


 send = "Hyperlink ('mgt %1', 'kill %2', 'click', 'yellow', '%3', 0)",
Amended on Sun 11 Jul 2021 10:43 PM by Nick Gammon
#2
omg thanks, that fixed it.

never even thought about that :)