Jump to content

stop - countdown


danusko
 Share

Recommended Posts

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 by danusko
Link to comment
Share on other sites

#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 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.

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...