sandin Posted March 4, 2007 Share Posted March 4, 2007 Hi all. My script contains alot of func., so if I just do: $starttime=TimerInit() do until TimerDiff($starttime)>15000oÝ÷ Ú+pYp¢¹²Z'«v÷öÚî©ò~éܪÞéZµçm¢-ì¬!ò+ºv§Êíçîɲ¶)vÇ+l¢[Ý¡ë'ßÛp¢¹+.¬¶*'°èZÜjhÁƧ"j'Ú+¶¶)Â+ajè·¬±¶«:¹É¸×©emçhëâjè·¬±¶«jëh×6AdlibEnable("myadlib") Func myadlib() If GUICtrlRead($progressbar) = 100 Then exit endif EndFunc But again, how to make a progress bar go to 100% within 15sec without stopping it when I launch one of the existing func? Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
Shevilie Posted March 4, 2007 Share Posted March 4, 2007 Well your nearly got it... try put your timer int the adlib Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
Shevilie Posted March 4, 2007 Share Posted March 4, 2007 (edited) AdlibEnable("myadlib") Func myadlib() If TimerDiff($starttime)>15000 Then Exit $i = $starttime \ 15000 * 100 ProgressSet( $i, $i & " percent") EndFunc $starttime=TimerInit() ProgressOn("Progress Meter", "Shutdown", "0 percent") While 1 Sleep(100) WEnd Edited March 4, 2007 by Shevilie Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
sandin Posted March 4, 2007 Author Share Posted March 4, 2007 Thank you, it's limited now (though, progress bar isn't mooving, but I'll figure it out... eventualy...) Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
sandin Posted March 5, 2007 Author Share Posted March 5, 2007 I need just a little more help. I decided not to include progress bar, but to set TraySetToolTip with time lefted till end. I have: AdlibEnable("myadlib", 60000) $starttime5=TimerInit() Func myadlib() ;>>>$timelefted=##NOW WHAT?###<<< ;>>>> I gues here goes: TraySetToolTip($timelefted), but I can't figure how to set $timelefted to read the lefted time till end of the program<<< If TimerDiff($starttime5)>3600000 Then msgbox(262144, "end", "the program ended as expected!") exit endif endfunc Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
sandin Posted March 5, 2007 Author Share Posted March 5, 2007 any suggestion plz? Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
xcal Posted March 5, 2007 Share Posted March 5, 2007 Stick a traysettooltip(TimerDiff($starttime5)) in your keep alive loop. How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
sandin Posted March 5, 2007 Author Share Posted March 5, 2007 Lol, it's good now, works. I made: traysettooltip("Time lefted 'till ending program: " & (3600000-TimerDiff($starttime5))/60000 & " min.") so it displayes lefted time in minutes, but the number is too long, (ex: Time lefted 'till ending program: 59.46578951235789 min.). Is there a way to short this number to maybie 2 or maybie even 0 decimals? Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
xcal Posted March 5, 2007 Share Posted March 5, 2007 $num = StringFormat('%.2f', 59.46578951235789) MsgBox(0, '', $num) How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
sandin Posted March 5, 2007 Author Share Posted March 5, 2007 I figured it out: AdlibEnable("myadlib", 60000) $starttime5=TimerInit() Func myadlib() $var1 = round ((5400000-TimerDiff($starttime5))/60000, 0) traysettooltip("Time lefted 'till ending program: " & $Var1 & " min.") If TimerDiff($starttime5)>3600000 Then msgbox(262144, "end", "the program ended as expected!") exit endif endfunc Thank you Shevilie, and thank you xcal for the help. Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll 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