Jump to content
Sign in to follow this  
GodForsakenSoul

wtf's the problem?!

Recommended Posts

GodForsakenSoul

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?

Share this post


Link to post
Share on other sites
Alek

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 by Alek

[font="Impact"]Never fear, I is here.[/font]

Share this post


Link to post
Share on other sites
Aceguy

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 by Aceguy

Share this post


Link to post
Share on other sites
GodForsakenSoul

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

Share this post


Link to post
Share on other sites
andybiochem

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 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!

Share this post


Link to post
Share on other sites
sandin

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  

×