|
diltoid24 Newbie
Joined: 08 Feb 2012 Posts: 7
|
Posted: Wed Feb 08, 2012 5:14 pm
Inputting scripts |
I primarily use zmud for a few mucks. I had it installed on my old computer and I never encountered this problem, but now I get it every time I use the program on my new system. I'm thinking there might be a setting I haven't changed, but anyway here's the problem.
Say I have a script, just a simple text file. Call it test.txt
Inside test.txt are the following lines:
lsedit test=me
.del 1 999
This is a test.
.end
If I use the input function -> Settings -> Input -> Script (ascii) it outputs the following into my zmud window:
lsedit test=me
del 1 999
This is a test.
end
The lsedit program I'm calling with the script requires the period to be in front of del and end. Does anyone know what setting to turn on or off in zmud to make it not omit the periods? Thanks! |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Wed Feb 08, 2012 6:33 pm |
try:
#FILE 1 test.txt
#READ 1 |
|
_________________ Discord: Shalimarwildcat |
|
|
|
diltoid24 Newbie
Joined: 08 Feb 2012 Posts: 7
|
Posted: Wed Feb 08, 2012 9:44 pm |
I don't quite understand. Try #file 1 test.txt where?
PS: I had to turn on parsing for that to work. #file opens a filename in the zmud directory and assigns it to variable 1 allowing #read 1 to input that filename into the data stream. No, this didn't work either, though. All this was was a more complicated way of clicking on Settings -> Input -> Script with the mouse :( |
|
|
|
diltoid24 Newbie
Joined: 08 Feb 2012 Posts: 7
|
Posted: Sun Feb 12, 2012 7:51 am |
Hah! Figured it out. For any with this problem, the answer lies in deselecting a certain check box located in:
View -> Preferences -> General -> Special Characters
Deselect the check beside Movement Char: . |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Mon Feb 13, 2012 5:01 pm |
Or put ~ in front of the . in the file.
|
|
_________________ Taz :) |
|
|
|
diltoid24 Newbie
Joined: 08 Feb 2012 Posts: 7
|
Posted: Mon Feb 13, 2012 6:26 pm |
I'll have to try the ~ trick. I did notice a new problem though. Now it doesn't input lined beginning with a { which is integral to most muf programer :(
|
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Mon Feb 13, 2012 6:41 pm |
{ isn't one of the characters in the Special Character list but it does mark sections of code and perhaps ~ might work in front of that too. What version of zMUD are you using?
|
|
_________________ Taz :) |
|
|
|
diltoid24 Newbie
Joined: 08 Feb 2012 Posts: 7
|
Posted: Mon Feb 13, 2012 7:29 pm |
Cant remember.. 7.4 or something like that..
|
|
|
|
diltoid24 Newbie
Joined: 08 Feb 2012 Posts: 7
|
Posted: Mon Feb 13, 2012 11:12 pm |
7.21 :> I was at work earlier.
|
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Tue Feb 14, 2012 6:30 pm |
You're issue will be because it is trying to interpret the contents as a zscript script. For instance you could load a whole class of aliases, variables and triggers. Although it would seem there should be nothing wrong with loading arbitrary mud commands in this way I would suggest doing so using a valid zscript function. Surround every line in your files with #SEND "" so for instance:
#SEND "lsedit test=me"
#SEND ".del 1 999"
#SEND "This is a test."
#SEND ".end"
You will need parsing on for this to work but at least doing this would mean none of your special characters would need disabling. Use the computer icon to turn on parsing load the script and then turn it off again. |
|
_________________ Taz :) |
|
|
|
diltoid24 Newbie
Joined: 08 Feb 2012 Posts: 7
|
Posted: Tue Feb 14, 2012 11:22 pm |
Ahhhh, I'll give that a try in a test script and see how it works. Thanks :>
|
|
|
|
|
|