Page 1 of 1

Script running

Posted: 2008-05-27 14:04:17
by motxu
I need a srcipt that can textprint how much time has the macro being running. Thanks :D

Posted: 2008-05-27 14:23:30
by Scripts Writer

Code: Select all

sub Time_Check()
  var STime=0
  var MTime=0
  var HTime=0
  uo.DeleteJournal()
  while not uo.InJournal('stop')
    STime=STime+1
    if STime==60 then
      if MTime==60 then
        HTime=HTime+1
        MTime=0
        STime=0
      else
        MTime=MTime+1
        STime=0
      end if
    end if
    if STime==0 || STime==15 || STime==30 || STime==45 || STime==60 then
      uo.Print('Script is running '+STR(HTime)+'houres / ' +STR(MTime)+' minuits / '+STR(STime)+' seconds.')
    end if
    wait(1000)
  wend
  uo.Print('Stoped. Time is: '+STR(HTime)+'houres / ' +STR(MTime)+' minuits / '+STR(STime)+' seconds.')
end sub

Posted: 2008-05-27 22:02:02
by motxu
thanks bro :D