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
aiwinar
Newbie


Joined: 07 Nov 2003
Posts: 2
Location: Finland

PostPosted: Fri Nov 07, 2003 1:06 am   

Commandline
 
How can i pick a string from a commandline to variable etc.
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Fri Nov 07, 2003 4:29 am   
 
string from the command line?
Wouldn't you just type it in?
Maybe an example would help everyone to understand you better.
Reply with quote
aiwinar
Newbie


Joined: 07 Nov 2003
Posts: 2
Location: Finland

PostPosted: Fri Nov 07, 2003 10:49 am   
 
Ok, example:

When you type on commandbox "hello" and then you press macrobutto, like F8. It will save "hello" in variable or somewhere. Without pressing "enter" anytime.

I have to make autocomplete. typing etc. "cd i" and pressing <tab> after that it will complete words automatically.

I think, that only way is make dll because Zmud's stringhandling sucks.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Nov 08, 2003 1:28 am   
 
quote:
When you type on commandbox "hello" and then you press macrobutto, like F8. It will save "hello" in variable or somewhere. Without pressing "enter" anytime.

No, I don't think this is possible.
It's fairly easy to create a variable without a macro but it does require using ENTER.
var1 = hello
#VAR var2 {hello}

If that's too difficult (or too slow), it's also fairly easy to make an alias to do it. Again, this does require using the ENTER key.
#AL v {#VAR var3 {%-1}}
and then just type
v hello

If avoiding the ENTER key is really important, you can use #PROMPT. This can be put in a macro
#KEY {F8} {#PROMPT var4}
Now, just press F8 and type in "hello", then TAB to reach the OK button and SPACE to finish. No ENTER key needed.


quote:
I have to make autocomplete. typing etc. "cd i" and pressing <tab> after that it will complete words automatically.

This is done with the TAB completion list. Use #TAB to add words to the list. After that, you only need to type the first few characters and press TAB, zMUD will complete the word for you. How many characters you'll need to type depends on the number of words which start the same way. It could be anywhere from 1 to the entire word. For instance, if your TAB list includes
ingenuity
intelligence
inventory
itself

then you'd need the first three characters of ingenuity, intelligence, or inventory but only the first two of itself. "iTAB" and "inTAB" will give you the first matching entry which might not be the one you want.

There's also SHIFT-TAB which doesn't rely on a list, but instead gives you the last matching word from the output window.


quote:
I think, that only way is make dll because Zmud's stringhandling sucks.

Insults aren't helpful and neither are vague complaints.
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