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


Joined: 03 Jul 2002
Posts: 6
Location: Canada

PostPosted: Wed Jul 03, 2002 5:05 pm   

writing to a file
 
Hi,
I am trying to capture notes and other miscellaneous information from zmud to a file called notes.txt. I have the following alias set up.

Name: write

#fi 1 notes.txt
#wr 1 %1
#cl 1

This seems to capture single words, but will not work with multiple words and sentences. I have tried various other combinations of wildcards and cannot seem to get it to work.
Any help would be appreciated.

Thanks in advance.
JD
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Jul 03, 2002 5:10 pm   
 
You are just missing the curly queue brackets
in your #WRITE command.
quote:

#WRITE examples
#WRI 1 {logged onto Dark Castle}
append the string to the end of text file number 1.

#WRI 6 {this is record 3} 3
writes the string as the third record in file 6.



#FILE 1 notes.txt
#WRITE {1 %1}
#CLOSE 1

Ton Diening
Providing untested answers that tend to be
more complicated than others.
Reply with quote
JBD
Newbie


Joined: 03 Jul 2002
Posts: 6
Location: Canada

PostPosted: Wed Jul 03, 2002 5:19 pm   
 
Thanks for the prompt reply Ton,

I tried adding the brackets, but it still does not seem to work. Any other suggestions?

JD
Reply with quote
Gandorf
Novice


Joined: 28 Oct 2000
Posts: 38
Location: Sweden

PostPosted: Wed Jul 03, 2002 5:35 pm   
 
since you are using a alias you need to use %-1 to capture everything you type after the alias

Gandorf
-------------------------
Out in the night they laugh about me and my knowledge
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Jul 03, 2002 5:41 pm   
 
I just baked. If you look at the help file
example you need to have the file number outside
of the brackets.


#WRITE 1 {%-1}

As Gandorf points out you need the %-1 to capture all parameters passed to your alias.


Ton Diening
Providing untested answers that tend to be
more complicated than others.
Reply with quote
JBD
Newbie


Joined: 03 Jul 2002
Posts: 6
Location: Canada

PostPosted: Wed Jul 03, 2002 5:56 pm   
 
Works like a charm. Thanks a bunch everyone.
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