Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ VBscript
➜ Time/Appending
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Hoss
USA (48 posts) Bio
|
| Date
| Tue 15 Mar 2005 03:18 AM (UTC) |
| Message
| I didn't see any other post about this but I want so when I receive this:
(Pages): Lazul says, "A rite to help you gather things."
It would appened 09:12|Lazu: A Rite to help you gather things.
I already have the trigger to put the name and message in but I need help in order to put the time it was said..
Here is the trigger I have so far:
<triggers>
<trigger
enabled="y"
match="(Pages): * says, "*""
send_to="5"
sequence="100"
>
<send>%1: %2</send>
</trigger>
</triggers>
Any help will be appreciated
Hoss
| | Top |
|
| Posted by
| Flannel
USA (1,230 posts) Bio
|
| Date
| Reply #1 on Tue 15 Mar 2005 07:39 AM (UTC) Amended on Tue 15 Mar 2005 07:40 AM (UTC) by Flannel
|
| Message
| You get the time using the VBScript time functions/variables/etc.
"Time" contains the current system time (Now contains date/time).
However, then you have to deal with seconds etc. You can use Hour() and Minute() to return those (with a time in parenthesis). I think that would be your best bet.
So, Hour(Now) would be the hour and Minute(Now) would be the minute.
You'd have to change to send to script, and then script this out and then send it back to the output. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | | Top |
|
| Posted by
| Hoss
USA (48 posts) Bio
|
| Date
| Reply #2 on Sat 19 Mar 2005 04:03 AM (UTC) |
| Message
| Hey Thanks I got it working now I'm having problems matching on two different lines For Example It shows:
(*): * says, "I don't suppose there's a * willing to(line Break)
reflect for me on spectre? I need the karma bad."
I was wondering how I could match on that and still match on something that is only one line like:
(*): * says, "We need ae general store."
Here's the trigger I have for appending:
<triggers>
<trigger
enabled="y"
match="(Magnagora): * *, "*.""
send_to="5"
sequence="99"
>
<send>world.AppendToNotepad "CityTells", Hour(Now) & ":" & Minute(Now) & " | (Magnagora) %1: %3"
</send>
</trigger>
</triggers>
but I'm having problems figuring out how to be able to match on multiple lines. Any Ideas?
Hoss | | Top |
|
| Posted by
| Hoss
USA (48 posts) Bio
|
| Date
| Reply #3 on Sat 19 Mar 2005 04:21 AM (UTC) |
| Message
| While I'm at it I'm having some problems with the MoveNotepadWindow command It doesn't seem to be working here is what I have MoveNotepadWindow "CHANNELS" 1, 430, 1020, 158 but whenever it matches on it and tries that it tells me
Error number: -2146827263
Event: Execution of line 2 column 32
Description: Expected end of statement
Line in error:
MoveNotepadWindow ("CHANNELS") 1, 430, 1020, 158
Called by: Immediate execution
Any Ideas?
Hoss | | Top |
|
| Posted by
| Hoss
USA (48 posts) Bio
|
| Date
| Reply #4 on Sat 19 Mar 2005 04:23 AM (UTC) |
| Message
| Also, How do you make it so when it does append to a notepad it puts it on a seperate line?
Hoss
(Sorry for all the questions) | | Top |
|
| Posted by
| Flannel
USA (1,230 posts) Bio
|
| Date
| Reply #5 on Sat 19 Mar 2005 06:11 AM (UTC) |
| Message
| Are the multiple lines serverside or just the client wrapping?
If they're clientside, you don't need to do anything differently. If they're serverside, you get you do some fun creative things (however, It's been done before) to determine when the line ends.
As for your move notepad, you'll need to seperate the notepad window name and the positions with a comma:
long MoveNotepadWindow(BSTR Title, long Left, long Top, long Width, long Height);
So, your example would be:
MoveNotepadWindow "CHANNELS", 1, 430, 1020, 158
Ah, I see that nick doesn't have that in his example. That's a typo on his part. There really should be that comma (and you don't put parenthesis).
And for linebreaks, you'll use VBCrLf (VisualBasic Carriage Return Line Feed) you just append it to the end of your strings like this:
AppendToNotepad "window", "somestuff to append" & VBCrLf
would append "somestuff to append" and then a newline (so your next append would end up on the next line).
Oh, and it's not case sensitive. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | | Top |
|
| Posted by
| Hoss
USA (48 posts) Bio
|
| Date
| Reply #6 on Sat 19 Mar 2005 04:16 PM (UTC) |
| Message
| | Thanks Flannel thats excatly what I needed to know | | 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.
23,438 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top