Sign in to follow this  
Followers 0
danusko

stop - countdown

3 posts in this topic

#1 ·  Posted (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 by danusko

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 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.

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0