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 ➜ General ➜ Problem calling script from an alias

Problem calling script from an alias

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


Posted by Vink   (7 posts)  Bio
Date Sat 03 Nov 2001 08:43 PM (UTC)
Message
in my auto-target setup i an alias

Alias: target *
Send:
Enabled: checked
All other options: unchecked
Label: Target_Alias
Script: OnAliasTarget

and in my script file

sub OnAliasTarget (thename, theoutput, thewildcards)
world.setvariable "target", thewildcards (1)
world.note "Victim set to " & thewildcards (1)
end sub


and another alias

Alias: b
Send: backstab @target
Enabled: checked
Expand variables: checked
All other options: unchecked


when i type "target man"
it should send the message "Victim set to man"
but it does not
when i type "b" it should backstab man, but i get a popup
box that says variable target not defined

why doesn't it work?
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 04 Nov 2001 04:20 AM (UTC)
Message
I tried what you did and it worked OK.

Your problem with the second alias is that the first one didn't work and set the variable, why I don't know.

Do you have scripting enabled, and the appropriate script file in the "Script file" box in the scripting configuration tab?

- Nick Gammon

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

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #2 on Sun 04 Nov 2001 04:44 AM (UTC)
Message
Also, be cautious when typing in the alias that you don't slip in an extra, unnoticed, space.

For example, this won't work:


target *(space)


or


target(space)(space)*



- Nick Gammon

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

Posted by Vink   (7 posts)  Bio
Date Reply #3 on Sun 04 Nov 2001 03:58 PM (UTC)
Message
yep i didn't have scripting enabled, i assumed it was automatically enabled for some reason
*whap me*
thanks nick
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.


14,941 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.