| View previous topic :: View next topic |
| Author |
Message |
Serenity
Joined: 08 Nov 2004 Posts: 1272
|
Posted: Sun Feb 20, 2005 8:09 pm Post subject: uptime - titlebar version |
|
|
For anyone who leaves their computer on for more than a few days. In a similar fashion to pixelget and titlebarclock, this displays the uptime in the titlebar and updates hourly. This doesn't display uptime as days/hours but as days to one decimal place.
Screenshot (also with pixelget and titlebarclock running):
Changelog:
Script size shortened by using gosub (thanks corrupt)
| Code: | ; uptime - titlebar version
; displays system uptime as days to one decimal place
#singleinstance force
menu, tray, tip, uptime titlebar
Gosub, Refresh
Gui, +AlwaysOnTop +ToolWindow -SysMenu -Caption
Gui, Color, CCCCCC
Gui, Font, cFF0000 s6 wbold, terminal
Gui, Add, Text, vD x50 y0, %uptimeD% days uptime
Gui, Show, NoActivate x100 y5, uptime ; screen position here
WinSet, TransColor, CCCCCC 255, uptime
SetTimer, Refresh, 3600000 ; update hourly
return
Refresh:
SetFormat, float, 0.1
uptime := A_TickCount ;
uptimeD := (uptime/1000/60/60/24) ; get days
uptimeD += 0.0 ; display as decimal
GuiControl, , D, %uptimeD% days uptime
return |
_________________ "Anything worth doing is worth doing slowly." - Mae West

Last edited by Serenity on Tue Feb 22, 2005 10:43 pm; edited 2 times in total |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 2952 Location: Minnesota
|
Posted: Sun Feb 20, 2005 11:42 pm Post subject: |
|
|
Looks like you've run out of room. What'll the next one be? A stand-alone toolbar to put it all in? |
|
| Back to top |
|
 |
Serenity
Joined: 08 Nov 2004 Posts: 1272
|
Posted: Sun Feb 20, 2005 11:58 pm Post subject: |
|
|
Thats true! But really, what else would I want to know? Apps like Samurize offer all kinds of resource/activity monitoring but after a while it seems for its own sake rather than for function which doesn't interest me. _________________ "Anything worth doing is worth doing slowly." - Mae West
 |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 2952 Location: Minnesota
|
Posted: Mon Feb 21, 2005 12:04 am Post subject: |
|
|
That is very, very true. Those kind of apps don't actually serve a purpose, really. I used sysmetrix for a while, then I realized that. Obviously, things like measuring pixels on a screen or finding the color of a particular background can be useful at times, but why would you need them while checking your e-mail or playing Warcraft?
Anyway, ya. I have a nice, simplistic desktop that I'm satisfied with, and most of the information I need I already know or can glance at an icon for. When I need to tinker, I get on my Linux and try to figure a little more of it out.  |
|
| Back to top |
|
 |
Serenity
Joined: 08 Nov 2004 Posts: 1272
|
Posted: Mon Feb 21, 2005 12:21 am Post subject: |
|
|
I'm much more of a multitasker, lots of things open at once. I actually need the uptime thingy to remind me to reboot. *laughs* Better that then how it was on Windows 98.  _________________ "Anything worth doing is worth doing slowly." - Mae West
 |
|
| Back to top |
|
 |
savage
Joined: 02 Jul 2004 Posts: 207
|
Posted: Mon Feb 21, 2005 8:15 pm Post subject: |
|
|
Mozilla WATERYAK!?!? Whattahell is that?
Neato titlebar tingies btw, I'll have to play with these for a while . |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 2952 Location: Minnesota
|
Posted: Mon Feb 21, 2005 8:43 pm Post subject: |
|
|
| The WaterYak is most likely one of the names generated by an extension which I forget the name of. It generates a random name to display in the titlebar every time you start SpaceSquirrel up. Some of the names it generates for SuperHamster are pretty darn funny, too. |
|
| Back to top |
|
 |
savage
Joined: 02 Jul 2004 Posts: 207
|
Posted: Mon Feb 21, 2005 9:51 pm Post subject: |
|
|
| Lol, I see. I can just imagine the logo for wateryak, this big hairy yak, dripping wet and shivering, with big puppy eyes. |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 2952 Location: Minnesota
|
Posted: Mon Feb 21, 2005 10:02 pm Post subject: |
|
|
 |
|
| Back to top |
|
 |
Serenity
Joined: 08 Nov 2004 Posts: 1272
|
Posted: Tue Feb 22, 2005 10:48 pm Post subject: |
|
|
Updated script with gosub routine, making script shorter.
| savage wrote: | Mozilla WATERYAK!?!? Whattahell is that? |
I'm running two extensions - Titlebar Tweaks (use this to just show program name) along with Firesomething to get the Wateryak.
| Quote: | Neato titlebar tingies btw, I'll have to play with these for a while . |
Thanks! _________________ "Anything worth doing is worth doing slowly." - Mae West
 |
|
| Back to top |
|
 |
Dippy46
Joined: 06 Jul 2004 Posts: 171 Location: Manchester, England.
|
Posted: Fri Feb 25, 2005 3:35 am Post subject: |
|
|
@Serenity
Sorry couln't resist this one.
| Code: |
loop
{
var=%a_now%
ontime := A_TickCount/1000
EnvAdd, var, -%ontime% ,seconds
FormatTime, BootUp, %var%, ddd dd MMM yyyy @ hh:mm tt
tooltip, Machine Active Since: `n %bootup%
sleep 10
}
|
_________________ Simple ideas lie within reach, only of complex minds |
|
| Back to top |
|
 |
Invalid User
Joined: 14 Feb 2005 Posts: 440 Location: Texas, Usa
|
Posted: Fri Feb 25, 2005 5:55 am Post subject: |
|
|
| Quote: | | I actually need the uptime thingy to remind me to reboot |
I havnt rebooted in weeks, is that a really bad thing? _________________ my lame sig  |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 2952 Location: Minnesota
|
Posted: Fri Feb 25, 2005 5:15 pm Post subject: |
|
|
If you're running Windows, most experts recommend rebooting every night. This is because Windows eventually accumulates extra resources and slows down over time. Sometimes it's not as noticable with power users, since they know how to take care of their system better, but the problem's still there.
In contrast, Linux has almost no problems like that. Some Linux servers running a minimum of tasks have been known to have uptimes of several years; other, more casual users say they have no problems leaving the system running for weeks or even months at a time. Personally, I still reboot it every couple of days just out of habit, but it's still an interesting thing to know about *nix.
P.S. Yes, I do know there are situations in which you should reboot, I'm merely saying that in casual use it's not as necessary as in Windows. |
|
| Back to top |
|
 |
Serenity
Joined: 08 Nov 2004 Posts: 1272
|
Posted: Sat Feb 26, 2005 2:50 am Post subject: |
|
|
Dippy, thanks.
| Invalid User wrote: | | Quote: | | I actually need the uptime thingy to remind me to reboot |
I havnt rebooted in weeks, is that a really bad thing? |
It depends on the OS and how you use your computer I suppose. I'm running 2k, and I have lots of programs open at once- it really starts to grind after say 10 days uptime. On Windows 98 I'd reboot at least 3 times a day with the same resources. Memory management on 2k and XP has improved alot. By comparison, in Linux processes tend to crash rather than the shell and many weeks uptime is not uncommon on a desktop machine. Windows for some reason just gets slower at performing all round the longer I leave it on. _________________ "Anything worth doing is worth doing slowly." - Mae West
 |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 2952 Location: Minnesota
|
Posted: Sat Feb 26, 2005 3:34 am Post subject: |
|
|
| Quote: | | Windows for some reason just gets slower at performing all round the longer I leave it on. |
This is one of the main problems with Windows and Microsoft acts like it isn't even an issue. Of course, the cause of it is widely known; Windows is poorly designed. Period.  |
|
| Back to top |
|
 |
|