(New message)
Subject review (reverse sequence)
Posted by
Virthe
(4 posts) bio
Date
Fri 25 May 2012 11:49 AM (UTC) [ quote
]
Message
Great! That fixed it. Thanks for your help. top
Posted by
Nick Gammon
Australia (18,770 posts) bio
Forum Administrator
Date
Fri 25 May 2012 01:05 AM (UTC) [ quote
]
Message
You are short some backslashes. Inside a Lua string you need to double them, eg.
OpenLog("D:\\Users\\User\\Documents\\AL\\log.txt",false)
And if this is in "send to script" you have to double them again.
- Nick Gammon
www.gammon.com.au, www.mushclient.com top
Posted by
Virthe
(4 posts) bio
Date
Thu 24 May 2012 02:55 PM (UTC) [ quote
] Amended on Thu 24 May 2012 06:09 PM (UTC) by Virthe
Message
Okay. I now have:
And an alias with the following script:
OpenLog("D:\Users\User\Documents\AL\log.txt",false)
SetLogOutput (true)
SetTriggerOption("eof","enabled","y")
world.Send("cat %1")
A trigger labelled "eof" with the following script:
FlushLog()
CloseLog()
SetTriggerOption("eof","enabled","n")
The trigger runs as planned and is enabled/disabled correctly.
However, the log file still doesn't work. No file is created. I have tried using the default log name with no success.
Is there anything else I need to do to enable/disable logging from the script? top
Posted by
Virthe
(4 posts) bio
Date
Thu 24 May 2012 01:03 PM (UTC) [ quote
]
Message
Okay, I think I can sort out the trigger (enabling and disabling it with SetTriggerOption).
I can't figure out how to get the log file working though. Am I on the right lines with that? Will it work if I move FlushLog() to the end of file trigger? top
Posted by
Fiendish
USA (848 posts) bio
Global Moderator
Date
Thu 24 May 2012 12:50 PM (UTC) [ quote
]
Message
Quote: Would I need to set up triggers to detect when the output of the command has finished?
Yes.
http://aardwolfclientpackage.googlecode.com/ top
Posted by
Virthe
(4 posts) bio
Date
Thu 24 May 2012 09:42 AM (UTC) [ quote
]
Message
I need to log the output of a command to a file on my hard disk?
So far I have this:
OpenLog("D:\Users\User\Documents\AL\test")
SetLogOutput (true)
world.Send("cat %1")
FlushLog()
It doesn't work at all.
I need to log all the output of the 'cat' command.
How do I correctly use log to store the MUD output?
Would I need to set up triggers to detect when the output of the command has finished? top
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
914 views.
Reply to this subject
Start a new subject
  Refresh page
Go to topic:
(Choose topic)
Area Editor: Bug reports
Area Editor: General
Area Editor: News and updates
Area Editor: Suggestions
Area Editor: Tips and tricks
Dawn of Time: Administration
Dawn of Time: Configuration
Dawn of Time: Installing/compiling the server
Dawn of Time: New Dawn Muds Announcements
Dawn of Time: Playing
Dawn of Time: What is Dawn of Time (Dawn)?
Electronics: Microprocessors
Electronics: Operational Amplifiers
Forum: About
Forum: Announcements
Forum: Mailing other users
Forum: Problems
Forum: Registering
Forum: Searching
Forum: Subscribing
Forum: Suggestions
Forum: Test
Forum: Time zones / time display
Forum software: Administration
Forum software: Installation
MUDs: Announcements
MUDs: General
MUDs: MUD Design Concepts
MUSHclient: Announcements
MUSHclient: Beta testing
MUSHclient: Bug reports
MUSHclient: Development
MUSHclient: General
MUSHclient: Getting Started
MUSHclient: International
MUSHclient: Jscript
MUSHclient: Lua
MUSHclient: Miniwindows
MUSHclient: MXP and Pueblo
MUSHclient: Perlscript
MUSHclient: Plugins
MUSHclient: Python
MUSHclient: Suggestions
MUSHclient: Tips and tricks
MUSHclient: VBscript
MUSHclient: Wine
PennMUSH: Compiling the server
PennMUSH: Running the server
Programming: General
Programming: STL
Quilting: General
ROM: Compiling the server
ROM: Running the server
SMAUG: Commands
SMAUG: Compiling the server
SMAUG: Lua
SMAUG: Running the server
SMAUG: SMAUG coding
Search the forum
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )