# How Know the time loop

## Recommended Posts

can i calculate how many (Sec;minutes) the program Loop?

I know I can include the command Refresh

Refresh

Refresh = Refresh+1

If Refresh = 10 then .......

But there is a way to calculate this time I remain without testing?

Tkx

Reggards

I read ... I update ... I learn ...

##### Share on other sites

can i calculate how many (Sec;minutes) the program Loop?

I know I can include the command Refresh

Refresh

Refresh = Refresh+1

If Refresh = 10 then .......

But there is a way to calculate this time I remain without testing?

Tkx

Reggards

Perhaps you are looking for TimerInit() and TimerDiff()? Hard to tell what you are asking.

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

##### Share on other sites

ok will try to exemple:

I must that script run and execute that normals funtions.

After 20 minuts for example i need it doet the comand Send ("x").

How to know the time 20''?

Perhaps your idea runs right...I had this idea now.Im at Work and here is to hard to look help in autoit...not installed

When at home will try it.

Sry if not clear in my question...& Tkx for reply PsaltyDS.

I read ... I update ... I learn ...

##### Share on other sites

```\$iInterval = 60*20
\$iInit = TimerInit()/1000

While 1
.
.
If \$iInit + \$iInterval <= (TimerDiff(\$iInit)/1000) Then
.
.
\$iInit = TimerInit()/1000
EndIf
.
.
WEnd```

##### Share on other sites

```\$iInterval = 60*20
\$iInit = TimerInit()/1000

While 1
.
.
If \$iInit + \$iInterval <= (TimerDiff(\$iInit)/1000) Then
.
.
\$iInit = TimerInit()/1000
EndIf
.
.
WEnd```
That is it

Tks

I read ... I update ... I learn ...

## Create an account

Register a new account

×

• Wiki

• Back

• Git