Ok. First of all I tried to use AdlibRegister, and I don't understand how this is really working - though it says that checkes every x min/sec...it checks one time for me. Is AdlibRegister not a good option to solve my problem, or am I not using it correcty?
#include <Date.au3>
$StartTime = "18:24"
AdlibRegister("_Check",1000*60)
$duration=30000
While 1;just idle around
Sleep(1000)
WEnd
Func _Check();every minute we check
$CurrentTime = _NowTime(4);the current time
ConsoleWrite("CurrentTime="&$CurrentTime&"---"&"StartTime="&$StartTime)
If ($CurrentTime == $StartTime) Then
MsgBox(0, "Test", "Execute my function")
$timer = timerinit()
do
;here will execute function
until timerdiff($timer) >= $duration;
EndIf
AdlibUnRegister();unregister the running function
Exit;and exit
EndFunc