|
Fewyn Wanderer
Joined: 27 Sep 2002 Posts: 83
|
Posted: Tue Mar 30, 2004 12:41 am
Some more scripting help |
Ok I have some triggers which capturer chats and put them into a new window.... I'm now trying to find a way to log these windows automatically. They each have their own settings file already but i can't seem to figure out how to make them automatically log.
I use
#ALIAS atconnect {#log %time( dd-mmm-yy).txt}
to log stuff in the main window. But since It doesn't connect in the other windows I'm not quite sure how to do it.
Any help will be appreciated! |
|
|
|
DeathShadow Adept
Joined: 11 Nov 2000 Posts: 228 Location: USA
|
Posted: Tue Mar 30, 2004 12:43 am |
Get things the way you want, and then Select 'Layout --> Lock layout' this should restore your windows on startup.
|
|
|
|
Fewyn Wanderer
Joined: 27 Sep 2002 Posts: 83
|
Posted: Tue Mar 30, 2004 12:47 am |
Um.... DeathShadow that has nothing to do with my question.
|
|
|
|
DeathShadow Adept
Joined: 11 Nov 2000 Posts: 228 Location: USA
|
Posted: Tue Mar 30, 2004 12:55 am |
Sorry, guess I do not understand the question then. :)
|
|
|
|
Fewyn Wanderer
Joined: 27 Sep 2002 Posts: 83
|
Posted: Tue Mar 30, 2004 1:11 am |
I want to be able to LOG the other windows to text files.
|
|
|
|
DeathShadow Adept
Joined: 11 Nov 2000 Posts: 228 Location: USA
|
Posted: Tue Mar 30, 2004 1:23 am |
Ok how about something like this:
#ALIAS atconnect {windowName1,windowName2,windowName3:#log %window_%time( dd-mmm-yy).txt}
That command *should* send the command to all the windows and create a logfile.
Untested, but should work or be pretty close. :) |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Mar 30, 2004 1:40 am |
Close, but separating the window names with commas wouldn't work. However, if no name is specified before the :, then it is sent to all windows. Thus, this:
:#log %window_%time( dd-mmm-yy).txt
should work. |
|
|
|
Fewyn Wanderer
Joined: 27 Sep 2002 Posts: 83
|
Posted: Tue Mar 30, 2004 1:52 am |
So Kjata I just add that to the capture script?
|
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Tue Mar 30, 2004 2:28 am |
In your main Settings
#ALIAS atconnect {:#log %window_%time( dd-mmm-yy).txt} |
|
|
|
Aarlot Adept
Joined: 30 Dec 2003 Posts: 226
|
Posted: Tue Mar 30, 2004 7:39 am |
Hrmm... I've been looking for something similar to this, too. But when i tried the above alias, it gave a syntax error for the # sign before "log". Havn't tested it yet... but I assume this would be a problem.
|
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Tue Mar 30, 2004 8:06 am |
quote: Originally posted by Kjata
Close, but separating the window names with commas wouldn't work.
Ok I tested it with Commas and it DOES work :P so try this
#AL Atconnect {:window1,win2,win3:#log %window_%time( dd-mmm-yy).txt} |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Mar 30, 2004 12:17 pm |
That's interesting, the comma-separated list, which is not mentioned in the help file, works, but the one with just : at the start, which is mentioned in the help file, doesn't work. Guess the help file needs an updating here.
The #ALL command doesn't seem to work either. Seems like it may be a problem with sending to all windows in general. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Mar 30, 2004 3:53 pm |
SIDE NOTE: I ran into this a week or two back, and reached the conclusion that #ALL and :text only send text to other main windows, not to child windows.
|
|
|
|
DeathShadow Adept
Joined: 11 Nov 2000 Posts: 228 Location: USA
|
Posted: Tue Mar 30, 2004 8:03 pm |
Work-a-round for #all
Lets call it, dsAll ;)
#alias dsAll {#forall {%names} {%i:%-1}}
This command will send commands to all opened windows (even child windows).
Usage related to this post would be:
#ALIAS Atconnect {dsAll #log %window_%time(dd-mmm-yy).txt} |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Mar 31, 2004 12:49 am |
I never knew about the comma feature with the focus character until Zugg mentioned it in a beta post about 2 weeks ago. It has been undocumented all this time.
Also I was noticing what appear to be bugs in the behavior of the focus char with a few functions when trying to work on someone elses question. The one that I first saw bugging was #ECHOPROMPT, when used with :windowname: it displays in the wrong window and isn't very prompt either. Sadly I went back to working on something else and never tested it enough to report it. Guess that is why we still have bugs. |
|
|
|
Pega Magician
Joined: 08 Jan 2001 Posts: 341 Location: Singapore
|
Posted: Wed Mar 31, 2004 3:14 am |
Shouldn't #ECHOPROMPT be similar to #ECHO in that it is supposed to, 'echo to the window the user is currently viewing.' - as seen in zMUD Help under #ECHO.
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Mar 31, 2004 4:23 am |
Guess it was a good thing I didn't start thinking about a bug report. I would have likely broken my own rules and not double checked the help prior to making it. You are quite right Pega, it should and does display to the top window; it still isn't being very prompt like. Guess there might still be a bug there.
|
|
|
|
|
|