danusko Posted February 23, 2006 Posted February 23, 2006 (edited) Please what i do wrong? I want only set variable f.e. 5 minutes, and i want that show me countdown in minutes, hours and second. But my script doesnt works. Please help. Thanke you. #include "C:\My documents\docs\AutoIt\Include\Date.au3" HotKeySet("q", "quit") Func quit() exit EndFunc ; ----------------------------------------------------- Global $Sec, $Min, $Hour, $Time Global $Sec2, $Min2, $Hour2, $Time2 $StartTicks = _TimeToTicks(@HOUR,@MIN,@SEC) $EndTicks = $StartTicks + 60 * 60 * 1000 $odpocet = $EndTicks - $StartTicks While 1 $odpocet = $EndTicks - 1 * 60 * 1000 _TicksToTime($odpocet,$Hour2,$Min2,$Sec2) ToolTip($Hour2 & ":" & $Min2 & ":" & $Sec2) ; MsgBox(262144,'' , 'New Time:' & $Hour & ":" & $Min & ":" & $Sec) ; $EndTicks = $StartTicks + 45 * 60 * 1000 Sleep(100) WEnd Edited February 23, 2006 by danusko
GaryFrost Posted February 23, 2006 Posted February 23, 2006 (edited) #include <Date.au3> HotKeySet("q", "quit") Func quit() Exit EndFunc ;==>quit ; ----------------------------------------------------- Global $Sec, $Min, $Hour, $Time Global $Sec2, $Min2, $Hour2, $Time2 $StartTicks = _TimeToTicks(@HOUR, @MIN, @SEC) $EndTicks = $StartTicks + 60 * 60 * 1000 $odpocet = $EndTicks - $StartTicks While 1 $odpocet = $EndTicks - 1 * 60 * 1000 _TicksToTime($odpocet, $Hour2, $Min2, $Sec2) ToolTip($Hour2 & ":" & $Min2 & ":" & $Sec2) ; MsgBox(262144,'' , 'New Time:' & $Hour & ":" & $Min & ":" & $Sec) ; $EndTicks = $StartTicks + 45 * 60 * 1000 Sleep(100) WEnd 1st. your hotkey didn't match your function 2nd. please post support question in the support section Edited February 23, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
danusko Posted February 23, 2006 Author Posted February 23, 2006 yes i know, i wrote it wrong - it was "quit" but it still doesnt work. And sorry for my mistake. I wrote it in support. thanks
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now