 |
JBD Newbie
Joined: 03 Jul 2002 Posts: 6 Location: Canada
|
Posted: 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 |
|
|
 |
TonDiening GURU

Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: 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.  |
|
|
 |
JBD Newbie
Joined: 03 Jul 2002 Posts: 6 Location: Canada
|
Posted: 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 |
|
|
 |
Gandorf Novice
Joined: 28 Oct 2000 Posts: 38 Location: Sweden
|
Posted: 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 |
|
|
 |
TonDiening GURU

Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: 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.  |
|
|
 |
JBD Newbie
Joined: 03 Jul 2002 Posts: 6 Location: Canada
|
Posted: Wed Jul 03, 2002 5:56 pm |
Works like a charm. Thanks a bunch everyone.
|
|
|
 |
|
|