[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Plugins
. . -> [Subject]  smooth analog/digital tick timer

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: smooth analog/digital tick timer
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Pez   (6 posts)  [Biography] bio
Date Sun 11 Sep 2011 11:57 AM (UTC)  quote  ]
Message
I got it working using the tips from Fiendish. That gave me exactly the timer I needed, and I am loading/enabling/disabling the timer from my vbscript. I realize there is probably a more efficient way to do it, but that was the easiest for me and is working perfectly. Thanks for the help!

Pez
[Go to top] top

Posted by Pez   (6 posts)  [Biography] bio
Date Fri 09 Sep 2011 08:12 PM (UTC)  quote  ]
Message
Thanks for the help. I will try to figure out how to make the changes based on this info.

Pez
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Thu 08 Sep 2011 09:31 PM (UTC)  quote  ]
Message
Call GetTimerInfo (13) to find how long until a timer fires.

Template:function=GetTimerInfo GetTimerInfo

The documentation for the GetTimerInfo script function is available online. It is also in the MUSHclient help file.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Fiendish   USA  (848 posts)  [Biography] bio   Global Moderator
Date Thu 08 Sep 2011 08:24 PM (UTC)  quote  ]

Amended on Thu 08 Sep 2011 08:25 PM (UTC) by Fiendish

Message
First replace all instances of 30 with the duration of your timer in seconds.

Then replace

function OnPluginTelnetOption (option)
   if option == string.char (101,1) then
      -- last_tick = os.time()
      last_tick = os.clock()
      -- SetStatus ("Time to tick: " .. (last_tick + 30) - os.time ())
   end -- if
end -- function

with something like

function MyTimerHasFired()
   last_tick = os.clock()
end

and have your timer call that function when it fires.

I think that ought to be all you need.

http://aardwolfclientpackage.googlecode.com/
[Go to top] top

Posted by Pez   (6 posts)  [Biography] bio
Date Thu 08 Sep 2011 06:55 PM (UTC)  quote  ]
Message
I would like to use this analog timer, but quite frankly I am not a good enough programmer to be able to modify it for my needs. Specifically, I don't want a tick timer, I simply am looking for an analog dial that shows how much time left until a mushclient timer fires. Any help would be appreciated.

Thanks,
Pez
[Go to top] top

Posted by Aard-Spartacus   (2 posts)  [Biography] bio
Date Fri 10 Jun 2011 03:37 AM (UTC)  quote  ]
Message
and it got several updates today and looks a lot better thanks to all the people telling me what was wrong with it! :)
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Thu 09 Jun 2011 11:57 PM (UTC)  quote  ]

Amended on Fri 10 Jun 2011 12:13 AM (UTC) by Nick Gammon

Message
Pretty cool, thanks for sharing!



Ah and I just discovered you can click on the triangle to bring up a menu which lets you change fonts, colours etc.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Aard-Spartacus   (2 posts)  [Biography] bio
Date Thu 09 Jun 2011 04:23 PM (UTC)  quote  ]
Message
Alright, first post here, but I've been lurking a while. No offense to anyone, but I got tired of my tick timer being in the status bar and overwriting stuff that was there every 2s, so I decided to move it out to a miniwin... and since I was doing that, I figured I'd give it a nice analog face... :)

Anyhow, what I have is IMHO a functional and nice looking tick timer. Y'all enjoy...

https://code.google.com/p/aardspart/source/browse/trunk/Mushclient/worlds/plugins/smoothTick.xml

PS - if you submit issues through the google project, I will try to address them

Spartacus
[Go to top] 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.


2,206 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]