Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Message
| To show the idea, this trigger will do it:
<triggers>
<trigger
enabled="y"
match="<*>*"
omit_from_output="y"
send_to="14"
sequence="100"
>
<send>
win = GetPluginID () .. "_prompt"
font = "f"
backgroundColour = ColourNameToRGB "dimgray"
-- create window if necessary
if not WindowInfo (win, 1) then
WindowCreate (win, 0, 0, 1, 1, miniwin.pos_bottom_left, 0, 0)
WindowFont (win, font, "Courier", 9)
height = WindowFontInfo (win, font, 1) + 10
TextRectangle (0, 0, 0, -(height + 2), 5, 0, 0, 0, miniwin.brush_solid)
end -- if
-- work out width of this prompt
width = WindowTextWidth (win, font, "%0") + 10
-- resize the window to fit
WindowResize (win, width, height , backgroundColour )
-- clear the window
WindowRectOp ( win, miniwin.rect_fill, 0, 0, 0, 0, backgroundColour )
left = 5
-- show each style run
for _, v in ipairs (TriggerStyleRuns) do
left = left + WindowText (win, font, v.text, left, 5, 0, 0, v.textcolour)
end -- for
-- make sure window visible
WindowShow (win, true)
</send>
</trigger>
</triggers>
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|