MAJORSAM Posted May 22, 2009 Share Posted May 22, 2009 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 More sharing options...
Authenticity Posted May 22, 2009 Share Posted May 22, 2009 (edited) 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 WEndEdit: By the way, it seems like it's padded so it should be Case '01:03'.... Edited May 22, 2009 by Authenticity Link to comment Share on other sites More sharing options...
CodyBarrett Posted May 22, 2009 Share Posted May 22, 2009 (edited) 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 May 22, 2009 by CodyBarrett [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
MAJORSAM Posted May 22, 2009 Author Share Posted May 22, 2009 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 More sharing options...
Authenticity Posted May 23, 2009 Share Posted May 23, 2009 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. Link to comment Share on other sites More sharing options...
MAJORSAM Posted May 23, 2009 Author Share Posted May 23, 2009 fixed it with giving the exes other shutdown hotkeys thx 4 help 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