Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

uptime - titlebar version


  • Please log in to reply
14 replies to this topic
Serenity
  • Members
  • 1271 posts
  • Last active:
  • Joined: 07 Nov 2004
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):
Posted Image

Changelog:
Script size shortened by using gosub (thanks corrupt)

; 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
Posted Image

jonny
  • Members
  • 2951 posts
  • Last active: Feb 24 2008 04:22 AM
  • Joined: 13 Nov 2004
Looks like you've run out of room. :lol: What'll the next one be? A stand-alone toolbar to put it all in?

Serenity
  • Members
  • 1271 posts
  • Last active:
  • Joined: 07 Nov 2004
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
Posted Image

jonny
  • Members
  • 2951 posts
  • Last active: Feb 24 2008 04:22 AM
  • Joined: 13 Nov 2004
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. :D

Serenity
  • Members
  • 1271 posts
  • Last active:
  • Joined: 07 Nov 2004
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
Posted Image

savage
  • Members
  • 207 posts
  • Last active: Jul 03 2008 03:12 AM
  • Joined: 02 Jul 2004
Mozilla WATERYAK!?!? :shock: Whattahell is that?

Neato titlebar tingies btw, I'll have to play with these for a while :).

jonny
  • Members
  • 2951 posts
  • Last active: Feb 24 2008 04:22 AM
  • Joined: 13 Nov 2004
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.

savage
  • Members
  • 207 posts
  • Last active: Jul 03 2008 03:12 AM
  • Joined: 02 Jul 2004
Lol, I see. I can just imagine the logo for wateryak, this big hairy yak, dripping wet and shivering, with big puppy eyes.

jonny
  • Members
  • 2951 posts
  • Last active: Feb 24 2008 04:22 AM
  • Joined: 13 Nov 2004
Posted Image

Serenity
  • Members
  • 1271 posts
  • Last active:
  • Joined: 07 Nov 2004
Updated script with gosub routine, making script shorter.

Mozilla WATERYAK!?!? :shock: Whattahell is that?


I'm running two extensions - Titlebar Tweaks (use this to just show program name) along with Firesomething to get the Wateryak.

Neato titlebar tingies btw, I'll have to play with these for a while :).


Thanks!
"Anything worth doing is worth doing slowly." - Mae West
Posted Image

Dippy46
  • Members
  • 171 posts
  • Last active: Aug 17 2007 06:53 AM
  • Joined: 06 Jul 2004
@Serenity
Sorry couln't resist this one. :lol:

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

Invalid User
  • Members
  • 447 posts
  • Last active: Mar 27 2012 01:04 PM
  • Joined: 14 Feb 2005

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 :)

jonny
  • Members
  • 2951 posts
  • Last active: Feb 24 2008 04:22 AM
  • Joined: 13 Nov 2004
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.

Serenity
  • Members
  • 1271 posts
  • Last active:
  • Joined: 07 Nov 2004
Dippy, thanks. :)

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
Posted Image

jonny
  • Members
  • 2951 posts
  • Last active: Feb 24 2008 04:22 AM
  • Joined: 13 Nov 2004

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