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
➜ Jscript
➜ Notepad colors
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Jetpig
(8 posts) Bio
|
| Date
| Mon 21 Feb 2005 10:28 PM (UTC) |
| Message
| I know of the NotepadColour script, but i can't get it to work. I have multiple note pad windows recording different channels. i'd like each one to be color coordinated with the MUDs color screen. It records fine, then when i went to put in the colorific-ness it went to shit.
// --------------------------------------------
// Subroutine to be called to set up notepad windows.
//
// Calls from trigger
// sends string to a notepad window for clan talk only
//
// --------------------------------------------
function OnMYClanTalk (strAliasName, strOutput, wildcardsVB)
{
world.AppendToNotepad("Clan Talk", "\r\n" + strOutput + "\r\n");
NotepadColour ("Clan Talk", "#008000", "#000000");
}
And here's the error:
Error number: -2146823281
Event: Execution of line 587 column 3
Description: Object expected
Called by: Function/Sub: OnMYClanTalk called by trigger
Reason: processing trigger "clan2"
And i call myself a nerd and i screw up a 2 line script *sobs*
| | Top |
|
| Posted by
| Nick Gammon
Australia (23,169 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Sat 26 Feb 2005 09:17 PM (UTC) |
| Message
| Can you find out from an editor which line is 587?
You may as well be consistent about whether or not you use the word "world".
Try:
AppendToNotepad("Clan Talk", "\r\n" + strOutput + "\r\n");
NotepadColour ("Clan Talk", "#008000", "#000000");
Also, I wouldn't do that colour for every trigger, that would tend to make the window flicker. Just do it once when you create the window (eg. on world startup).
Try typing each of those lines individually into the command window (prefixed by the script prefix, eg. "/") to see which one has the problem.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Jetpig
(8 posts) Bio
|
| Date
| Reply #2 on Sat 26 Feb 2005 09:25 PM (UTC) |
| Message
| // --------------------------------------------
// Subroutine to be called to set up notepad windows.
//
// Calls from trigger
// sends %1 to a notepad window for clan talk only
//
// --------------------------------------------
function OnMYClanTalk (strAliasName, strOutput, wildcardsVB)
{
AppendToNotepad("Clan Talk", "\r\n" + strOutput + "\r\n");
NotepadColour ("Clan Talk", "#008000", "#000000");
}
the open bracket "{" (or is that a brace? ...i can never remember) is line 597. and there was no change on the change you made :( i'll try making the color changes at open. | | Top |
|
| Posted by
| Jetpig
(8 posts) Bio
|
| Date
| Reply #3 on Sat 26 Feb 2005 09:46 PM (UTC) |
| Message
| well i wrote a little script:
// --------------------------------------------
// Subroutine to be called to set open notepad windows and to color them.
//
// starts on world open
//
// --------------------------------------------
function NotepadsWorldOpen ()
{
AppendToNotepad ("Clan Talk", "====>WORLD OPEN<====\r\n"); //opens clan talk notepad window
AppendToNotepad ("Tells", "====>WORLD OPEN<====\r\n"); //opens tells notepad window
AppendToNotepad("RP", "====>WORLD OPEN<====\r\n"); //opens RP notepad window
NotepadColour ("RP", "magenta", "black"); //colors RP notepad window
NotepadColour ("Clan Talk", "green", "black"); //colors clan talk notepad window
NotepadColour ("Tells", "lime", "black"); //colors tells notepad window
}
it's supposed to open all the notepad windows, then apply colors. the line number is once again the open bracket on this one. i tried it on world open and i get a similar error except the called by : changes to called by world open (obvisously) and the reason changes to opening world. It has no problems opening the notepad windows, it gets the error when trying to color. so i get 3 motehpad windows all of the default colors.
here's the error:
Error number: -2146823281
Event: Execution of line 569 column 2
Description: Object expected
Called by: Function/Sub: NotepadsWorldOpen called by world connect
Reason: connecting to world
| | Top |
|
| Posted by
| Nick Gammon
Australia (23,169 posts) Bio
Forum Administrator |
| Date
| Reply #4 on Sun 27 Feb 2005 05:49 AM (UTC) |
| Message
| | Which version of MUSHclient are you using? Colouring notepad windows is a recent addition. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Jetpig
(8 posts) Bio
|
| Date
| Reply #5 on Sun 27 Feb 2005 07:13 AM (UTC) |
| Message
| | version 3.5 so it's in there. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,169 posts) Bio
Forum Administrator |
| Date
| Reply #6 on Wed 23 Mar 2005 07:45 PM (UTC) |
| Message
| I tried that exact script and it worked and opened the notepad windows without error. What version of Jscript do you have?
If you run the JScript_Version plugin you can find out. Mine reports:
Script engine = JScript
Version = 5.6
Build = 6626
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Jetpig
(8 posts) Bio
|
| Date
| Reply #7 on Thu 24 Mar 2005 08:18 PM (UTC) |
| Message
| Script engine = JScript
Version = 5.1
Build = 8513 | | Top |
|
| Posted by
| Nick Gammon
Australia (23,169 posts) Bio
Forum Administrator |
| Date
| Reply #8 on Thu 07 Apr 2005 04:48 AM (UTC) |
| Message
| | It works in version 5.6, perhaps upgrade from 5.1. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | 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.
27,031 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top