The Wiki for Tale 4 is in read-only mode and is available for archival and reference purposes only. Please visit the current Tale 11 Wiki in the meantime.

If you have any issues with this Wiki, please post in #wiki-editing on Discord or contact Brad in-game.

User:Cegaiel/Macros/StopWatch/Code

From A Tale in the Desert
< User:Cegaiel‎ | Macros‎ | StopWatch
Revision as of 06:19, 17 February 2010 by Cegaiel (talk | contribs)
Jump to navigationJump to search
counter = 0 

	Gui, -Destroy
	Gui, +AlwaysOnTop +ToolWindow
	Gui, Font, normal
	Gui, Add, Text, vLocationText, Start Timer: NumPad (+) , Stop Timer: Numpad (-)`n`n
	Gui, Show

KeyWait, NumpadAdd, D

loop
{
GetKeyState, state, NumpadSub
if state = D
{
counter := counter/10
break
}
	counter++
	Display := counter/10
	SetFormat, float, 0.1 
	GuiControl, Text, LocationText, %Display% seconds has elapsed...`n`nPress Numpad Minus (-) to STOP  timer 
	sleep 100
}


	GuiControl, Text, LocationText, %Display% seconds has elapsed...`n`n Press <Spacebar> to clear/reset timer


KeyWait, Space, D
if ErrorLevel = 0
{
Reload
}