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 ➜ VBscript ➜ alias to modify a timer - "Omit From Output"

alias to modify a timer - "Omit From Output"

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


Posted by ErockMahan   (81 posts)  Bio
Date Fri 14 Dec 2007 11:47 PM (UTC)
Message
I have found and researched the GetTimerInfo and SetTimerOption features, but I can't seem to modify the "Omit From Output" boolean box.

I wrote an alias to do this:

world.SetTimerOption "breathlight", "Omit From Output", "1"

but it doesn't do anything. I just want to use an alias to toggle the "omit from output" box on or off. I don't want to turn the timer off, as I need it to keep going even if I can't see what it is doing.

Removing the quotes around the "1" doesn't seem to help, is what I'm attempting even possible?
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Sat 15 Dec 2007 04:25 AM (UTC)
Message
If you check that option in a test timer, and the use the Copy button to get a copy of the timer onto the clipboard, you can see the correct spelling of the option. Try this:


SetTimerOption "breathlight", "omit_from_output", "1"

- Nick Gammon

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

Posted by ErockMahan   (81 posts)  Bio
Date Reply #2 on Mon 17 Dec 2007 03:51 PM (UTC)
Message
You are a brilliant, brilliant man.
Top

Posted by ErockMahan   (81 posts)  Bio
Date Reply #3 on Wed 19 Dec 2007 04:10 PM (UTC)
Message
Can a timer call a variable? I don't see any option that makes that possible...
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #4 on Thu 20 Dec 2007 12:02 AM (UTC)
Message
How do you mean "call a variable"?

Timers can set variables, you can send to variable, or you can do it in scripting (send to script).

- Nick Gammon

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

Posted by ErockMahan   (81 posts)  Bio
Date Reply #5 on Thu 20 Dec 2007 09:15 PM (UTC)
Message
I mean have a timer do "eat @food"
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #6 on Fri 21 Dec 2007 02:21 AM (UTC)
Message
Ah I see. It doesn't seem to support expanding variables, so just script it, like this (in Lua):


<timers>
  <timer 
   enabled="y" 
   second="5.00"    
   send_to="12"
>
  <send>

require "var"
Send ("eat " .. var.food)

</send>

  </timer>
</timers>


In VBscript, the 2 script lines would be replaced by:


Send "eat " & GetVariable ("food")


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


18,944 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.