Assign text selected by mouse to variable

Post Reply
icezblade
Posts: 2
Joined: Fri Jan 12, 2018 8:05 am

Assign text selected by mouse to variable

Post by icezblade » Fri Jan 12, 2018 8:23 am

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?

Jor'Mox
Posts: 975
Joined: Wed Apr 03, 2013 2:19 am

Re: Assign text selected by mouse to variable

Post by Jor'Mox » Fri Jan 12, 2018 11:23 pm

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.

User avatar
Vadi
Posts: 4554
Joined: Sat Mar 14, 2009 3:13 pm

Re: Assign text selected by mouse to variable

Post by Vadi » Sun Jan 14, 2018 1:57 pm

What Jor'Mox said. If you tell us what you'd like to do, we could think of a solution

icezblade
Posts: 2
Joined: Fri Jan 12, 2018 8:05 am

Re: Assign text selected by mouse to variable

Post by icezblade » Mon Jan 15, 2018 6:28 am

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?

User avatar
Vadi
Posts: 4554
Joined: Sat Mar 14, 2009 3:13 pm

Re: Assign text selected by mouse to variable

Post by Vadi » Mon Jan 15, 2018 6:57 am

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!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests