Jump to content

why does this not work?


Recommended Posts

hi

i don´t know why this not works....can anyone help me?

$time = @HOUR & ":" & @MIN

While 1

Sleep(10000)

If $time = "0:59" Then

Sleep(100)

ProcessClose("stern.exe")

Sleep(100)

ProcessClose("firefox.exe")

Sleep(100)

ProcessClose("botit.exe")

Endif

If $time = "1:01" Then

Sleep(10000)

Run("C:\Desktop\botit.exe")

EndIf

If $time = "1:03" Then

Sleep(100)

shutdown(32)

Endif

WEnd

thx ahead

Link to comment
Share on other sites

Because it stays constant because nothing is updating it inside the loop:

While 1
    $time = @HOUR & ":" & @MIN
    Sleep(10000)
    Switch $time
        Case "0:59"
            Sleep(100)
            ProcessClose("stern.exe")
            Sleep(100)
            ProcessClose("firefox.exe")
            Sleep(100)
            ProcessClose("botit.exe")
        Case "1:01"
            Sleep(10000)
            Run("C:\Desktop\botit.exe")
        Case "1:03"
            Sleep(100)
            Shutdown(32)
    EndSwitch
WEnd

Edit: By the way, it seems like it's padded so it should be Case '01:03'....

Edited by Authenticity
Link to comment
Share on other sites

you could always convert it to a 12 hour clock

If @HOUR > 12 then
$iHour = @hour - 12
$iTime = $iHour & ':' & @MIN
ElseIf @HOUR <= 12 Then
If Stringleft (@HOUR, 1) = 0 then
$iTime = Stringtrimleft (@HOUR,1) & ':' & @MIN
Elseif Stringleft (@HOUR, 1) = 1 then
$iTime = @HOUR & ':' & @MIN
Endif
Endif

EDIT but that still keeps the AM like (Ex) "01:50"

EDIT #2 ok now it gets rid of the "0" in the front (ex) "1:50"

Edited by CodyBarrett
Link to comment
Share on other sites

Because it stays constant because nothing is updating it inside the loop:

While 1
    $time = @HOUR & ":" & @MIN
    Sleep(10000)
    Switch $time
        Case "0:59"
            Sleep(100)
            ProcessClose("stern.exe")
            Sleep(100)
            ProcessClose("firefox.exe")
            Sleep(100)
            ProcessClose("botit.exe")
        Case "1:01"
            Sleep(10000)
            Run("C:\Desktop\botit.exe")
        Case "1:03"
            Sleep(100)
            Shutdown(32)
    EndSwitch
WEnd

Edit: By the way, it seems like it's padded so it should be Case '01:03'....

this works, but it does not close the exe....the exes just close when i roll over the icon in windows...whats that`? :)
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...