Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Lua
➜ Add an Entry to the context menu
Add an Entry to the context menu
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| WillFa
USA (525 posts) Bio
|
Date
| Wed 19 Nov 2008 05:07 AM (UTC) |
Message
| I wanted to add a menu item to the right-click menu so that I could highlight some output, right click, and send that to an alias.
for example,
function qSearch(Text)
for x in Text:gmatch("%w+") do
Send("exa " .. x)
Send("search " .. x)
end
end
I can figure out the code to get the selection length, and such, to supply that to the function, but I can't see if there's a way so that while I've got my hand on the mouse and highlighting the output, if I could just right click and execute that script, or another script that gets the selection and fires the above.
Thanks for any help.
| Top |
|
Posted by
| Worstje
Netherlands (899 posts) Bio
|
Date
| Reply #1 on Wed 19 Nov 2008 06:20 AM (UTC) Amended on Wed 19 Nov 2008 06:21 AM (UTC) by Worstje
|
Message
| I don't think that's possible currently.
Also, if you want to call an alias, you may want to use Execute() instead of Send(). And that loop doesn't seem really sane either, unless you want to call two aliases per selected word, rather than one alias depending on the menu item selected. | Top |
|
Posted by
| WillFa
USA (525 posts) Bio
|
Date
| Reply #2 on Wed 19 Nov 2008 06:56 AM (UTC) |
Message
| exa (examine) and search are mud commands. It's basically to hit all the nouns in a block of text to get their descriptions. It's a brute force method to questing on 3Kingdoms.
| Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #3 on Wed 19 Nov 2008 10:40 PM (UTC) |
Message
| You can't add to the context menu, but you can build your own menu that appears when you do Ctrl+Left-click.
Simply make an alias to do what you want, give it a name, and check "Menu". It then appears in that menu (by the name you give it). |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Worstje
Netherlands (899 posts) Bio
|
Date
| Reply #4 on Thu 20 Nov 2008 (UTC) |
Message
| I never saw that menu option in the alias window. It -does-, however, explain how the hell to fill that menu I occasionally managed to randomclick into appearance.
/me is fully content now! | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
16,017 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top