26
Post New Requests Here / Re: Simple Counter Utility Wanted
« on: September 09, 2011, 03:36 PM »
Of cource I can't beat skwire , but this is how I like it:
Code: Autohotkey [Select]
- #SingleInstance, Force
- iMyCount := 0
- bAllowUpdate := True
- Return
- MainGuiClose:
- MainGuiEscape:
- {
- }
- Return
- CountUp:
- {
- iMyCount++
- FormatAndUpdate( iMyCount )
- }
- Return
- CountDown:
- {
- If Not bAllowNegatives
- {
- If iMyCount
- iMyCount--
- }
- Else
- iMyCount--
- FormatAndUpdate( iMyCount )
- }
- Return
- HourCount:
- {
- {
- If ( bAllowUpdate = True )
- {
- ; Increase counter by one and then don't allow any more increases until this minute is up.
- Gosub, CountUp
- bAllowUpdate := False
- }
- }
- Else
- {
- bAllowUpdate := True
- }
- }
- Return
- ToggleHourCount:
- {
- If bDoHourCount
- Else
- }
- Return
- InputValue:
- {
- }
- Return
- InputGuiClose:
- InputGuiEscape:
- {
- }
- Return
- NewInput:
- {
- If Not iMyInput
- {
- IfMsgBox No
- Return
- }
- FormatAndUpdate( iMyInput )
- iMyCount := iMyInput
- iMyInput :=
- }
- Return
- ; FormatInteger -- by Winkie
- FormatAndUpdate( Int )
- {
- vVar := Int
- If vVar < 0
- {
- vMinus := "-"
- }
- {
- If vVar > 999
- {
- vTrim := vLen - 3
- vOut := "." vPart vOut
- }
- Else
- }
- }