ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

DONE: Across-the-room Stability Monitor

<< < (2/5) > >>

LuckMan212:
1 more suggestion:  how about an .ini file that stores the last window size/position so it gets preserved between launches? that would be nice!

jgpaiva:
3MB for this app is a little high but since you are using AHK there is not much you can do. -LuckMan212 (February 03, 2006, 10:33 AM)
--- End quote ---
Yep, i also figured you'd consider it a bit too much, but there really isn't any other option

One question, why did you put an additional "X" button in the top left?  something wrong with the normal close button in the title bar?
-LuckMan212 (February 03, 2006, 10:33 AM)
--- End quote ---
Ops... Put it there for testing and forgot to remove it. Code below is fixed, and i changed a performance setting to see if it consumes less memory. I don't think that ahk can do better than this :(

1 more suggestion:  how about an .ini file that stores the last window size/position so it gets preserved between launches? that would be nice!
-LuckMan212 (February 03, 2006, 11:06 AM)
--- End quote ---
Actually, i thought of this, but i still don't know how to do them, but I'm about to learn.
Tomorrow, if i don't forget, I'll post a version with an ini-file configuration ;)


--- ---; Stability Monitor
SetBatchLines, 100ms
Menu, tray, noicon
gosub ShowGui
return

ShowGui:
  Gui, Add, Button,gButtonSubmit vButtonSubmit x0 y0 w0 h0 +default,&X
  Gui,  +AlwaysOnTop +Resize
  Gui, Color, Red
  ChangeColor = red
  SetTimer, Changer, 1000
  Gui, Show, x200 y200 w20 h100,Stability Monitor
return

Changer:
  GoSub %ChangeColor%
return

red:
  Gui, Color, Red
  ChangeColor = green
return

Green:
  Gui, Color, Green
  ChangeColor = Blue
return

Blue:
  Gui, Color, Blue
  ChangeColor = Yellow
return

Yellow:
  Gui, Color, yellow
  ChangeColor = black
return

Black:
  Gui, Color, Black
  changeColor = red
return

ButtonSubmit:
exitapp
return

GuiClose:
exitapp
return

LuckMan212:
Tomorrow, if i don't forget, I'll post a version with an ini-file configuration ;)-jgpaiva (February 03, 2006, 11:09 AM)
--- End quote ---
wow great stuff!! thanks a lot jgpaiva!
 :D

skrommel:
 :) Did you get that ini version, LuckMan212?

If not, here's one.

Skrommel



--- ---;Alive - Show a flashing window to indicate a living system
;To use, save as Alive.ahk, download and install AutoHotkey from www.autohotkey.com
;Skrommel @2006

#SingleInstance,Force
OnExit,EXIT

x=
y=
w=100
h=100
pause=1000
color=FF0000

IfExist,Alive.ini
{
  IniRead,x,Alive.ini,Settings,x
  IniRead,y,Alive.ini,Settings,y
  IniRead,w,Alive.ini,Settings,w
  IniRead,h,Alive.ini,Settings,h
  IniRead,pause,Alive.ini,Settings,pause
}

Gui,+AlwaysOnTop +Resize
Gui,Color,%color%
Gui,Show,x%x% y%y% w%w% h%h%,Alive!
WinMove,Alive!,,%x%,%y%,%w%,%h%
SetTimer,CHANGE,%pause%
Return

CHANGE:
Gui,Color,%color%
StringLeft,first,color,2
StringTrimLeft,last,color,2
color=%last%%first%
Return

GuiClose:
EXIT:
WinGetPos,x,y,w,h,Alive!
IniWrite,%x%,Alive.ini,Settings,x
IniWrite,%y%,Alive.ini,Settings,y
IniWrite,%w%,Alive.ini,Settings,w
IniWrite,%h%,Alive.ini,Settings,h
IniWrite,%pause%,Alive.ini,Settings,pause
ExitApp

LuckMan212:
hey skrommel!  thanks-- works a treat

I need to learn AHK one of these days!  ;D

Can you tell me how to modify this app so it just alternates 0000FF and 000000 colors? (black/green).  I assume you can set a variable, something like....

if var=000000 then set var=0000FF else set var=000000
change color to var
..

but I dont know how to do this in AHK  :'(

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version