Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Loop for schedule
#3
Here's the entire code

Seems to handle both situations you mention.
tested, seems to work flawlessly, some minor tweaks to go (recurrence is the thoughest).
QM is invaluable and a money saver.

Code:
Copy      Help
out
int+ MinPrec
int Heures Minutes
str HeuresS MinutesS h
ARRAY(str) a
str Schedluded=
;23 32 "C:\Windows\regedit.exe" ""
;22 33 "C:\Windows\write.exe" ""
;23 34 "C:\Windows\notepad.exe" ""
out "lancé"
rep
,RetourneHeureMinutes(&Heures &Minutes)
,HeuresS=Heures
,MinutesS=Minutes
,if(Minutes=MinPrec)
,,out "Minute déjà faite"
,,goto h
,foreach h Schedluded
,,tok(h a -1 "" 4)
,,if(a[0].beg(HeuresS)=0) continue
,,if(StrCompare(a[1] MinutesS)=0)
,,,run a[2] a[3]
,,MinPrec=Minutes
,,;h
,,wait 60

If you have corrections or comments to improve it, they are welcome!!.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)