AutoHotkey Community

It is currently May 25th, 2012, 5:31 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: February 20th, 2005, 8:09 pm 
Offline

Joined: November 8th, 2004, 12:46 am
Posts: 1271
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):
Image

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
Image


Last edited by Serenity on February 22nd, 2005, 10:43 pm, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 20th, 2005, 11:42 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
Looks like you've run out of room. :lol: What'll the next one be? A stand-alone toolbar to put it all in?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 20th, 2005, 11:58 pm 
Offline

Joined: November 8th, 2004, 12:46 am
Posts: 1271
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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2005, 12:04 am 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2005, 12:21 am 
Offline

Joined: November 8th, 2004, 12:46 am
Posts: 1271
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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2005, 8:15 pm 
Offline

Joined: July 2nd, 2004, 11:53 pm
Posts: 207
Mozilla WATERYAK!?!? :shock: Whattahell is that?

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2005, 8:43 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2005, 9:51 pm 
Offline

Joined: July 2nd, 2004, 11:53 pm
Posts: 207
Lol, I see. I can just imagine the logo for wateryak, this big hairy yak, dripping wet and shivering, with big puppy eyes.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2005, 10:02 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 22nd, 2005, 10:48 pm 
Offline

Joined: November 8th, 2004, 12:46 am
Posts: 1271
Updated script with gosub routine, making script shorter.

savage wrote:
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.

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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 25th, 2005, 3:35 am 
Offline

Joined: July 6th, 2004, 10:07 am
Posts: 171
Location: Manchester, England.
@Serenity
Sorry couln't resist this one. :lol:

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 25th, 2005, 5:55 am 
Offline

Joined: February 14th, 2005, 10:54 am
Posts: 447
Location: Texas, Usa
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 :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 25th, 2005, 5:15 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2005, 2:50 am 
Offline

Joined: November 8th, 2004, 12:46 am
Posts: 1271
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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2005, 3:34 am 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
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. :?


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: lblb and 32 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group