mikehunt114 Posted July 31, 2006 Share Posted July 31, 2006 (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 July 31, 2006 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] Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted July 31, 2006 Moderators Share Posted July 31, 2006 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 Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 31, 2006 Share Posted July 31, 2006 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 Link to comment Share on other sites More sharing options...
mikehunt114 Posted July 31, 2006 Author Share Posted July 31, 2006 That worked well Mega, thanks. 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] Link to comment Share on other sites More sharing options...
Xenobiologist Posted August 1, 2006 Share Posted August 1, 2006 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now