Jump to content
Sign in to follow this  
AntiBNI

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() 
   Select 
       Case $msg = $GUI_EVENT_CLOSE 
           ExitLoop 
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") 
EndIf 
EndSelect 
WEnd

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

Thanks in Advice

Cheers...

Anti

Share this post


Link to post
Share on other sites

hmm i just want to know how to implement the value given to the input into

@SEC

thats all.

and Time init/Diff its in miliseconds i need a value of Secs or Hours.

Share this post


Link to post
Share on other sites

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.

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  

×
×
  • Create New...