fastb Posted April 29, 2006 Share Posted April 29, 2006 I'm new to AutoIt and I have a question. I know how to open a program using AutoIt script. Acctually it is VLC player that records a TV program. I would like to know how to close that program(VLC) that's recording after some time. So. I would like to open a program that records and automatically close it after (lets say) and hour. Thanks! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 29, 2006 Moderators Share Posted April 29, 2006 I'm new to AutoIt and I have a question.I know how to open a program using AutoIt script. Acctually it is VLC player that records a TV program.I would like to know how to close that program(VLC) that's recording after some time. So.I would like to open a program that records and automatically close it after (lets say) and hour.Thanks!Welcome to the forums...There are a few functions you could look at. TimerInit()/TimerDiff() ... _NowTime() ... @Hour / @Min / @Sec ... _TicksToTime() / _TimeToTicks() ... All of these can be found in the Beta versions of AutoIt. From there it should just be an If/Then a While/WEnd and some math.Beta can be found here: http://www.autoitscript.com/forum/index.ph...opic=19717&st=0 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 More sharing options...
Lakes Posted April 29, 2006 Share Posted April 29, 2006 Welcome to the forums... There are a few functions you could look at. TimerInit()/TimerDiff() ... _NowTime() ... @Hour / @Min / @Sec ... _TicksToTime() / _TimeToTicks() ... All of these can be found in the Beta versions of AutoIt. From there it should just be an If/Then a While/WEnd and some math. Beta can be found here: http://www.autoitscript.com/forum/index.ph...opic=19717&st=0$begin = TimerInit() Run("Notepad.exe", "") While 1 $dif = TimerDiff($begin) If $dif > 5000 then ; wait 5 Secs WinClose("Untitled - Notepad","") Exit EndIf WEnd 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
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