Register forum user name Search FAQ

Gammon Forum

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 ➜ Python ➜ clearscreen

clearscreen

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Scotty   Australia  (13 posts)  Bio
Date Sun 12 Mar 2006 12:18 PM (UTC)
Message
I recently had cause to change one of my worlds scripting from vb to python, which I'm not terribly familiar with.

I've reworked all my triggers and much to my suprise got them working <g>

Oddly enough I'm having trouble with an alias. This particular alias provides clearscreen functionality by sending a bunch of newlines via send to output. I've pasted it at the end of this post.

For some reason what I get now is a Huh?

Clearly now that I've moved to python it's NOT sending the \n's in the same way it did when I was using vb ... but I can't for the life of me figure out what it SHOULD be sending to achieve my goal?

Any pointers?

<aliases>
<alias
match="clearscreen"
enabled="y"
omit_from_log="y"
send_to="2"
sequence="80"
>
<send>






































</send>
</alias>
</aliases>


Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Sun 12 Mar 2006 08:19 PM (UTC)
Message
Maybe you want to do world.note, not world.send? What you're doing now is sending newlines to the MUD, not to the display. I'm not sure how to fix that in Python, though...

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #2 on Sun 12 Mar 2006 10:20 PM (UTC)
Message
He is doing send to output, the alias look OK, and in fact works for me.

Is it actually firing? Edit the alias and see if the match count is greater than zero.

Maybe you are mis-typing "clearscreen" - seemed to work perfectly on my copy.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Scotty   Australia  (13 posts)  Bio
Date Reply #3 on Tue 14 Mar 2006 08:04 AM (UTC)
Message
Well spotted Nick - it's not firing.

Although aliases were enabled, a little exploration revealed that none of them were firing.

Unable to figure out why, I opted for the quick fix and recreated that world from scratch, as I only had a few triggers and aliases running.


Thanks for that
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #4 on Tue 14 Mar 2006 12:07 PM (UTC)
Message
There is a global "enable aliases" checkbox - perhaps that was unchecked? You shouldn't need to recreate the entire world to get an alias to work.

- 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.


17,202 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.