GodForsakenSoul Posted January 10, 2009 Share Posted January 10, 2009 Dim Const $l=1 Dim $tm=14 Dim $ts=60 While $l=1 Sleep (1000) $ts=$ts-1 If $ts=0 Then $tm=$tm-1 $ts=60 If $tm=0 And $ts=0 Then WinActivate("Adobe Flash CS3") Send ("^s") $tm=14 $ts=60 EndIf ElseIf $tm=0 and $ts=30 Then ToolTip("Saving in 30 seconds, please stand by", 0, 0, "Flash autosave") Sleep(2000) ToolTip("") EndIf WEnd SOMETHING here is wrong. something is keeping from the script to reset itself when it's time. i can't figure out what. help? Link to comment Share on other sites More sharing options...
Alek Posted January 10, 2009 Share Posted January 10, 2009 (edited) Dim Const $l=1 Dim $tm=14 Dim $ts=60 While $l=1 Sleep (1000) $ts=$ts-1 If $ts=0 Then $tm=$tm-1 ;$ts=60 If $tm=0 And $ts=0 Then WinActivate("Adobe Flash CS3") Send ("^s") $tm=14 $ts=60 EndIf ElseIf $tm=0 and $ts=30 Then ToolTip("Saving in 30 seconds, please stand by", 0, 0, "Flash autosave") Sleep(2000) ToolTip("") EndIf WEnd Edited January 10, 2009 by Alek [font="Impact"]Never fear, I is here.[/font] Link to comment Share on other sites More sharing options...
Aceguy Posted January 10, 2009 Share Posted January 10, 2009 (edited) this is your solution Dim Const $l = 1 Dim $tm = 14 Dim $ts = 60 While $l = 1 Sleep(1000) $ts -= 1 tooltip($tm & ":" & $ts & @LF) If $ts = 0 and $tm >0 Then $tm-=1 $ts = 60 ElseIf $tm = 0 And $ts = 30 Then ToolTip("Saving in 30 seconds, please stand by", 0, 0, "Flash autosave") ElseIf $tm = 0 And $ts = 28 Then ToolTip("") ElseIf $tm = 0 And $ts = 0 Then WinActivate("Adobe Flash CS3") Send("^s") $tm = 14 $ts = 60 EndIf WEnd Edited January 10, 2009 by Aceguy [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
GodForsakenSoul Posted January 12, 2009 Author Share Posted January 12, 2009 this is your solution Dim Const $l = 1 Dim $tm = 14 Dim $ts = 60 While $l = 1 Sleep(1000) $ts -= 1 tooltip($tm & ":" & $ts & @LF) If $ts = 0 and $tm >0 Then $tm-=1 $ts = 60 ElseIf $tm = 0 And $ts = 30 Then ToolTip("Saving in 30 seconds, please stand by", 0, 0, "Flash autosave") ElseIf $tm = 0 And $ts = 28 Then ToolTip("") ElseIf $tm = 0 And $ts = 0 Then WinActivate("Adobe Flash CS3") Send("^s") $tm = 14 $ts = 60 EndIf WEnd er... i wanna know what's the problem though, to avoid it next time. i can't figure out what you changed. o.o Link to comment Share on other sites More sharing options...
andybiochem Posted January 12, 2009 Share Posted January 12, 2009 (edited) er... i wanna know what's the problem though, to avoid it next time. i can't figure out what you changed. o.o It looks like your problem is here: .... $tm=$tm-1 $ts=60 If $tm=0 And $ts=0 Then WinActivate("Adobe Flash CS3") Send ("^s") $tm=14 $ts=60 EndIf ..... can you see why the content of the IF statement will never be triggered? hint: look at the conditions of your IF statement, and look at the line that preceeds it. [EDIT] see ALEKs post also Edited January 12, 2009 by andybiochem - Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar! Link to comment Share on other sites More sharing options...
sandin Posted January 12, 2009 Share Posted January 12, 2009 maybe repair $tm line, make it If $tm <> 0 then $tm -= 1 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