This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Yamaha R-N301 control and PA System automation
#2
Nice example, one small improvement: you can use captures inside of regexps like this:

Code:
power=string.sub(string.match(response_body,"<Power>%a+</Power>"), 8, -9)

power=string.match(response_body,"<Power>(%a+)</Power>")

Both lines do exactly the same thing, but you don't have to count characters when using captures Smile
Reply


Messages In This Thread
RE: Yamaha R-N301 control and PA System automation - by admin - 09.07.2015, 11:54

Forum Jump: