Sign in to follow this  
Followers 0
mikehunt114

Timer hep

5 posts in this topic

#1 ·  Posted (edited)

I'm trying to get this function to write() until a certain time is up, and then I want it to rewrite() before going back and write() again, and am having trouble. I also want the time displayed... I have it set to go to 5 mins...here is the code:

Func ct()

$begin = TimerStart()

Do

$dif = TimerStop($begin)

$diff = $dif / 60000

TrayTip("Time (min): " & $diff , 1)

write()

until $diff = 5

rewrite()

ct()

EndFunc

Edited by mikehunt114

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post


Link to post
Share on other sites



I think this does what you are wanting.

While 1
    $begin = TimerStart()
    Do
        $dif = TimerDiff($begin)
        $diff = $dif / 60000
        TrayTip("", "Time (min): " & $diff, 1)
        write ()
    Until $diff = 5
    rewrite ()
WEnd

Share this post


Link to post
Share on other sites

Hi,

or

ct()
Func ct()
    $begin = TimerInit()
    Do
        $dif = Round(TimerDiff($begin),2)
        ToolTip("Time (min): " & $dif)
        write ()
    Until $dif >= 5000.00
    rewrite ()
EndFunc   ;==>ct

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

That worked well Mega, thanks.

You are welcome!

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0