Jump to content

Array with different minute amount (sleep while countdown)


pezo89
 Share

Recommended Posts

Good evening guys,
I am trying to capture some study videos at my school that is just in a damn player (not available offline) 
and the videos Vary in Lenght
what I am trying to do is that after each video is done, it will stop OBS, save a file and continue to the next video.
however, how can I do this the simplest way possible?
I were thinking of having a sleep command based on an array and have the actions in a function
so something like (just written down here not in au3.

while 1
sleep($array)
save ()
function save()
$array+1
endfunc

but since I am not sure how to set up an array I can use in a sleep command I was hoping for some help :)

or is it just easier to have it sleep with these number under a local command 

ie.

local $time1=72000
local $time2=72000

global $number=1

sleep($time"$number")

<-Action made-->
$number=$number+1


some of the times I have noted down so far is: they are in minutes (about 60 more with varying length)
01:20
01:20
07:42
02:35
01:35
07:09

 

/best regard 

Andreas

Link to comment
Share on other sites

Hi,

you could use an array to store the sleeping delay.

something like this:

Global $aTime[10]=[80,80,502,155]

For $x=0 to 3
    ConsoleWrite(@HOUR & ":" & @MIN & ":" & @SEC & @crlf )
    Sleep ($aTime[$x]*1000)
Next

1:20 is 80 seconds, and because the delay is in milliseconds you can multiply it with 1000 to get it right.

Some of my script sourcecode

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