Jump to content
Sign in to follow this  
MAJORSAM

why does this not work?

Recommended Posts

MAJORSAM

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

Share this post


Link to post
Share on other sites
Authenticity

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

Share this post


Link to post
Share on other sites
CodyBarrett

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

Share this post


Link to post
Share on other sites
MAJORSAM

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`? :)

Share this post


Link to post
Share on other sites
Authenticity

You mean their tray icons isn't disappearing or what? If the ProcessClose() case is satisfied then it should close these processes. You can check it using Windows Task Manager.

Share this post


Link to post
Share on other sites
MAJORSAM

fixed it with giving the exes other shutdown hotkeys :)

thx 4 help

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.