Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Sep 02, 2002 11:43 pm   

%selected word completion
 
I looked at %selword, but it's not quite what I was looking for (being limited to just one word). Is there any way to mimic %selword's word completion or otherwise fix %selected's boundaries?

li'l shmoe of Dragon's Gate MUD
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Sep 03, 2002 12:29 am   
 
Sorry, you lost me there. What is it that you want to do? If you need word completion, you might want to try looking at TAB completion, where you type part of the string, hit TAB, and zMUD fills in the rest.

Kjata
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Sep 03, 2002 7:01 am   
 
quote:

Sorry, you lost me there. What is it that you want to do? If you need word completion, you might want to try looking at TAB completion, where you type part of the string, hit TAB, and zMUD fills in the rest.

Kjata



Hmm, seems I was asking the wrong question. Forget %selword and %selected, is there any way to manipulate %selpos so that if something IS selected I can force the selection to the first two words of the line?

The line in question is a user-modified arrivals/departure line similar to the following:

Xxxxxxx Xxxxxxxx arrived: 10:24:56 pm

No matter what the user selected, only the first two words of the line need to be considered. Depending on the menu selected, the user will either want to add or remove the name from the Enemies list or the Friends list.

I'm fairly certain I'll have to maintain a master list of names/lines sent to this window (so I can not only compare the selected text, but also determine what name is selected should a partial selection be made), but if I can do it the above way it'd be super.

li'l shmoe of Dragon's Gate MUD
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Sep 03, 2002 12:49 pm   
 
Try this:
%concat(%word(%selline,1), " ", %word(%selline,2))

This also works as the caption for a menu item.

Kjata
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net