Hi,
I want to write some lines, matched by a trigger and send to script, draw on a floating window.
But I have one big problem: How can I get the colour or style informations of that line?
I have looked at Nick Gammon Map script and found a relevant part:
His trigger is a bit simpler than mine, but exacly analogue:
You can see, that he is calling map_redirect of a Lua-Script (I have removed some non relevant parts):
You can see that the function provide 4 parameter. But when I set up the same function in Python. I get an error, that only 3 parameters are allowed.
Do I have to enable something in the script to get the colour work? On the documentation for triggers, calling a script file, I have found:
"Lua only - a table of all the styles in the line"
Can I get the style information of the line anyway?
Aryzu
I want to write some lines, matched by a trigger and send to script, draw on a floating window.
But I have one big problem: How can I get the colour or style informations of that line?
I have looked at Nick Gammon Map script and found a relevant part:
His trigger is a bit simpler than mine, but exacly analogue:
<trigger
enabled="y"
match="<MAPSTART>"
script="map_redirect"
omit_from_output="y"
name="map_start"
sequence="100"
>
</trigger>
You can see, that he is calling map_redirect of a Lua-Script (I have removed some non relevant parts):
function map_redirect (name, line, wildcards, styles)
local len = #line
table.insert (map_lines, styles)
max_width = math.max (max_width, len)
end -- if
end -- function map_redirect
You can see that the function provide 4 parameter. But when I set up the same function in Python. I get an error, that only 3 parameters are allowed.
Do I have to enable something in the script to get the colour work? On the documentation for triggers, calling a script file, I have found:
"Lua only - a table of all the styles in the line"
Can I get the style information of the line anyway?
Aryzu