Page 1 of 1

Assign text selected by mouse to variable

Posted: Fri Jan 12, 2018 8:23 am
by icezblade
Hello,
1.use mouse to select/highlight text
2.assign selected text to variable

A. What are the help keywords that I should be se.arching for?
C. Is mouse selected text auto assigned to a variable?
D. Can I get this via copy clipboard?

Re: Assign text selected by mouse to variable

Posted: Fri Jan 12, 2018 11:23 pm
by Jor'Mox
To my knowledge, there is no way to access what has been selected by the mouse. The functions that allow you to copy text from the screen use a second, hidden cursor, that allows for selections to take place invisibly, but they don't give access to something selected in the more normal fashion.

Re: Assign text selected by mouse to variable

Posted: Sun Jan 14, 2018 1:57 pm
by Vadi
What Jor'Mox said. If you tell us what you'd like to do, we could think of a solution

Re: Assign text selected by mouse to variable

Posted: Mon Jan 15, 2018 6:28 am
by icezblade
I am looking at a more menu/ button driven/ alias method.
Click on a painting in the room description and select examine or enter.
Click on a sword and select get, drop etc

Instead of using triggers to capture and classify all the text into mobs, items and furnitures, I can select only the text I require and choose my actions manually.

A quick question: Anyway to map getMouse in pixels to moveCursor, selectSection in lines/font?

Re: Assign text selected by mouse to variable

Posted: Mon Jan 15, 2018 6:57 am
by Vadi
You can insert links and menus into text that are clickable, and you can also adjust existing text to become clickable. See setLink(), echoLink(), insertPopup(), and others in https://wiki.mudlet.org/w/Manual:UI_Functions. That'll give you the interactivity you're looking for!