|
JoKeR Newbie
Joined: 20 Feb 2004 Posts: 9 Location: Italy
|
Posted: Sun Mar 01, 2009 3:16 pm
Help for <CR> |
I cant send automatically a Carriage Return in my triggers...
#cr not work... and waith a <CR>
I need for some edit online...
Helps? Suggestions? |
|
|
|
Leitia Adept
Joined: 04 May 2007 Posts: 292 Location: Boston
|
Posted: Sun Mar 01, 2009 3:33 pm |
From predefined variables in the reference section of HELP
%cr a carrige return character
%crlf a carrige return and a linefeed character, together they are called newline
%lf a linefeed character
You could try to #NOOP %cr or these above. I think the preffered useage is #CALL but anything to do with coms makes me timid
I think I recall not being able to use the above to send an enter key, though that may be as it should. |
|
Last edited by Leitia on Sun Mar 01, 2009 3:36 pm; edited 1 time in total |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Mar 01, 2009 3:35 pm |
Perhaps you're coming at whatever problem you're having from the wrong direction. Tell us what you're trying to do and we can give you advice about that specifically.
|
|
|
|
JoKeR Newbie
Joined: 20 Feb 2004 Posts: 9 Location: Italy
|
Posted: Sun Mar 01, 2009 3:43 pm |
It' a simply setting of some value in pur online editor ...
I need to send this string and have a <cr> after each... 2 on the last for exit editor and come on normal vision...
woedit %1
16
-1 |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Mar 01, 2009 5:15 pm |
#send %cr is what you're after, I think.
EDIT: Btw, Leitia, #call might make you timid, but from a user perspective it does the same thing as #noop when you're just using it with zScript functions, so what's the problem? And using #call or #noop in this case wouldn't be right, because they discard the return. You could see %cr as a function that returns a CR character, so discarding the return makes it useless. #call is for calling functions that do something (like, say, CMUD's %pref function), and you don't care about what it returns. |
|
|
|
JoKeR Newbie
Joined: 20 Feb 2004 Posts: 9 Location: Italy
|
Posted: Sun Mar 01, 2009 5:26 pm |
Dear Fang Xianfu... not work! (Fang Xianfu)
I need another CR by keyboard! :| |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Mar 01, 2009 7:21 pm |
I'm not sure if you mean that it's not working entirely, or if because you needed to send two and it only sent one, you need another one to be sent. If you need to send two, send two:
#send %cr%cr
or
#send %cr
#send %cr |
|
|
|
JoKeR Newbie
Joined: 20 Feb 2004 Posts: 9 Location: Italy
|
Posted: Sun Mar 01, 2009 9:24 pm |
No Fang, no work ... it need an "enter" pressed... :|
|
|
|
|
Leitia Adept
Joined: 04 May 2007 Posts: 292 Location: Boston
|
Posted: Mon Mar 02, 2009 7:22 pm |
Thank You Fang, that was a very good explanation. Sorry for any confusion to the OP.
|
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Tue Mar 03, 2009 12:41 am |
I'm not entirely what you're looking but if you're trying to simulate a carriage return you can try %crlf.
Can you give a better explanation of what exactly you are trying to accomplish? Is there are particular input you are trying to respond to? |
|
_________________ Asati di tempari! |
|
|
|
JoKeR Newbie
Joined: 20 Feb 2004 Posts: 9 Location: Italy
|
Posted: Tue Mar 03, 2009 4:19 pm |
Dear thech... no works!
It' a simply setting of some value in our online editor ...
I start to edit an obj or a mob and i need to send this string and have a <cr> after each...
Works whit simple CR on alias editor but for exit the online editor i need 2 CR for come back at normal vision...
And i can't with %cr or %crcr or %crlf ... any suggestions?
The alias may be :
woedit %1
16 <------ A simple value
-1 <------ A simple value
ENTER
ENTER
Help a poor Imp! ;) |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Mar 03, 2009 11:45 pm |
If I am understanding correctly the only problem you have is with exiting the editor from the alias.
Code: |
#ALIAS something {
woedit %1
16
-1} |
Properly sends the first 3 commands.
You just need to get 2 blank commands sent as well. #CR would be the correct command for this, but since you said it didn't work we will use #SEND.
Code: |
#ALIAS something {
woedit %1
16
-1
#SEND {%cr%cr}} |
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
JoKeR Newbie
Joined: 20 Feb 2004 Posts: 9 Location: Italy
|
Posted: Wed Mar 04, 2009 9:52 am |
Dear Vijilante...
...not works :(
The MUD wait another CR but accept only a press of ENTER key ...
My zMUD is a 7.21 ... may be a problem of my Online Editor?
Now i take a look... |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Mar 04, 2009 11:36 am |
Without knowing exactly what part doesn't work I can't really help you further.
You gave a very full explanation of what you want to have happen 2 posts ago. I wrote the alias based on that. You have to explain exactly what actually happened for any of us to help you.
To make the explanation easier use this alias
Code: |
#ALIAS Debug {
#DEBUG trace.txt test.txt
woedit %1
16
-1
#CR
#CR
#ALARM {+10} {#DEBUG}} |
Then post the contents of trace.txt and test.txt inside of [code] tags. You will find the 2 files in your zMud directory. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
|
|