Jump to content

Recommended Posts

Posted

This function works properly:

$begin = TimerStart()

$dif = TimerStop($begin)

MsgBox(4096,"Time Difference",$dif)

But is it possible to display the running time without stopping the timer?

I tried several things without success.

Thanks in advance!

Johannes from Germany :whistle:

Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post]

  • Developers
Posted

Johannes,

This will show the splashtext screen and update it ....

$begin = TimerStart()

$W_Title = "Progress Window"

while 1

Showstatus("Running for:" & TimerStop($begin))

sleep(1000)

wend

Func ShowStatus($msg)

if Not WinExists($W_Title,"") then

    SplashTextOn($W_Title,$msg,300,100,1,1,6,"Arial",10,600)

else

    ControlSetText($W_Title,"","Static1",$msg)

EndIf

EndFunc

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

  • Administrators
Posted

But is it possible to display the running time without stopping the timer?

TimerStop doesn't actually "stop" the timer it just gives you the difference of the current time and the "base" time. So you can keep using TimerStop with the original return value of TimerStart.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...