Jump to content

In having a litle problem in making a Timer


Recommended Posts

well im making a script that it consists of a GUI with a Input.

what i want it to do is that when i type a anumber i want the script to run untill that time is up and make something.

heres my script

#include <GUIConstants.au3> 
GUICreate ("test",300,300) 
$time=GUICtrlCreateInput ("",1,1) 
$button=GUICtrlCreateButton ("start",50,50) 
GUISetState () 

While 1 
   $msg = GUIGetMsg() 
       Case $msg = $GUI_EVENT_CLOSE 
Case $msg = $button 
If @SEC = $time Then; heres the thing i want as meny seconds as i type in the input,i tried & $time tried GUICtrlRead ($time) and bunch of ways but none had work.
    MsgBox (1,"test","test msg") 

so im posting cuz many minds thing better then 1 xD.

Thanks in Advice



Link to comment
Share on other sites

  • Moderators

There are 1000 milliseconds in a second. Divide milliseconds by 1000 to get seconds. Divide the seconds by 360 to get hours.

There's only 360 seconds in an hour?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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

  • Recently Browsing   0 members

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