|
You last visited: Today at 23:40
Advertisement
tiemr problems plz help
Discussion on tiemr problems plz help within the AutoIt forum part of the Coders Den category.
03/12/2012, 21:40
|
#1
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,234
Received Thanks: 1,095
|
tiemr problems plz help
Code:
If TimerDiff($_TimerLog) < 1000 Then
If $Seconds > "59" Then
$Seconds = "00"
GUICtrlSetData($timer, $Days&":"&$Hours&":"&$Minutes&":"&$Seconds)
$Minutes += 1
If $Minutes > "59" Then
$Minutes = "00"
GUICtrlSetData($timer, $Days&":"&$Hours&":"&$Minutes&":"&$Seconds)
$Hours += 1
EndIf
If $Hours > "59" Then
$Hours = "00"
GUICtrlSetData($timer, $Days&":"&$Hours&":"&$Minutes&":"&$Seconds)
$Days += 1
EndIf
Else
$Seconds = $Seconds + 1
EndIf
GUICtrlSetData($timer, $Days&":"&$Hours&":"&$Minutes&":"&$Seconds)
Else
MsgBox(0, "", "bad")
EndIf
$_TimerLog = TimerInit()
anybody know how to make this set the timer every 1sec not every milisec?
i dont wana use sleep ... ;/
|
|
|
03/12/2012, 21:59
|
#2
|
elite*gold: 50
Join Date: Mar 2010
Posts: 1,373
Received Thanks: 521
|
Sorry for not answering your question, but I would use an other Way to calcute the time.
PHP Code:
$hour = Int($time/3600000)
$min = Int(Mod($time, 3600000)/60000)
$sec = Int(Mod(Mod($time, 3600000), 60000)/1000)
Not tested...
|
|
|
03/12/2012, 22:06
|
#3
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,234
Received Thanks: 1,095
|
na the time calculation is fine like now.. but the problem is that i dunno how to make it change only every 1sec... apart from using adlib
|
|
|
03/12/2012, 22:13
|
#4
|
elite*gold: 50
Join Date: Mar 2010
Posts: 1,373
Received Thanks: 521
|
PHP Code:
$time = 0
$timer = TimerInit()
While 1
If TimerDiff($timer)-$time >= 1000 Then
$time = TimerDiff($timer)
;Do Something
EndIf
WEnd
|
|
|
03/12/2012, 22:14
|
#5
|
elite*gold: 0
Join Date: Nov 2009
Posts: 221
Received Thanks: 71
|
You have to change only this line
Code:
[COLOR=#660066]If[/COLOR] [COLOR=#660066]TimerDiff[/COLOR][COLOR=#666600]([/COLOR]$_TimerLog[COLOR=#666600])[/COLOR] [COLOR=#666600]<[/COLOR] [COLOR=#006666]1000[/COLOR] [COLOR=#660066]Then[/COLOR]
at the moment <1000. This is true at 0-1000 milliseconds
it have to be =1000. This is only true at 1000 milliseconds
=1000 may not work because you dont hit the 1000 exact
use this to get it work
Code:
TimerDiff($_TimerLog) >= 1000 Then
|
|
|
03/13/2012, 18:01
|
#6
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,234
Received Thanks: 1,095
|
Quote:
Originally Posted by bollen
You have to change only this line
Code:
[COLOR=#660066]If[/COLOR] [COLOR=#660066]TimerDiff[/COLOR][COLOR=#666600]([/COLOR]$_TimerLog[COLOR=#666600])[/COLOR] [COLOR=#666600]<[/COLOR] [COLOR=#006666]1000[/COLOR] [COLOR=#660066]Then[/COLOR]
at the moment <1000. This is true at 0-1000 milliseconds
it have to be =1000. This is only true at 1000 milliseconds
=1000 may not work because you dont hit the 1000 exact
use this to get it work
Code:
TimerDiff($_TimerLog) >= 1000 Then
|
thnx epic 
now ive another problem .. how to prevent the timer from getting frozen by cheat engine or anything else  D
|
|
|
03/13/2012, 18:50
|
#7
|
elite*gold: 50
Join Date: Mar 2010
Posts: 1,373
Received Thanks: 521
|
Quote:
Originally Posted by fear-x
thnx epic 
now ive another problem .. how to prevent the timer from getting frozen by cheat engine or anything else  D
|
You could try the  function. I think this function isn't affected by Cheat Engine.
|
|
|
03/13/2012, 19:11
|
#8
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,234
Received Thanks: 1,095
|
didnt help :/ i need timer not clock :/
any way of preventing timer being edited would b e good.i was thinking of using registries but then again they can find out where and which bcz ppl would look everywhere posible :/
|
|
|
03/13/2012, 21:58
|
#9
|
elite*gold: 0
Join Date: Dec 2010
Posts: 150
Received Thanks: 930
|
Code:
[COLOR="Blue"]$Minutes = 90 [COLOR="Lime"]; will wait 90 minutes[/COLOR]
Local $60Count = 0, $begin = TimerInit()
While $Minutes > $60Count
$dif = TimerDiff($begin)
$dif2 = StringLeft($dif, StringInStr($dif, ".") -1)
$Count = int($dif/1000)
$60Count = Int($Count / 60)
ToolTip("Minutes Required = " & $Minutes & @CRLF & "Minutes Past = " & $60Count & @CRLF & "Seconds Count = " & $Count & @CRLF & "Mili-Seconds Count = " & $dif2, 20, 20, "Time Machine #1", 1)
Sleep(20)
WEnd[/COLOR]
Working For me men
|
|
|
03/13/2012, 22:03
|
#10
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,234
Received Thanks: 1,095
|
thnx guys for help
but i decided to make timer server side
using some clock scripts on server and reading time from client side  will definetly prevent hacking timer
|
|
|
03/14/2012, 18:22
|
#11
|
elite*gold: 50
Join Date: Mar 2010
Posts: 1,373
Received Thanks: 521
|
Quote:
Originally Posted by fear-x
will definetly prevent hacking timer 
|
Packethacking...
|
|
|
 |
Similar Threads
|
Roc Mountain Teleport Problems? DC Problems?
12/11/2011 - SRO Private Server - 1 Replies
I have got a problem to the teleport to Roc Mountain? (to aircraft dock and reverse scrool, non of them can teleport me to the Roc mountain inside area)
In my database when Roc Mt. value is (2), i don't teleport here. It is true.
When value is (1), i can teleport. It is true too.
But when I change the value 2 to 1 the DC problem is arises.
When i try to summon a attacker pet or i try to mount a vehicle (all of them can occur same problem) the dc problem is happen. Also some times when i...
|
Roc Mountain Teleport Problems? DC Problems?
12/08/2011 - Silkroad Online - 0 Replies
I have got a problem to the teleport to Roc Mountain? (to aircraft dock and reverse scrool, non of them can teleport me to the Roc mountain inside area)
In my database when Roc Mt. value is (2), i don't teleport here. It is true.
When value is (1), i can teleport. It is true too.
But when I change the value 2 to 1 the DC problem is arises.
When i try to summon a attacker pet or i try to mount a vehicle (all of them can occur same problem) the dc problem is happen. Also some times when i...
|
5165 Problems! 2 problems!
02/28/2010 - CO2 Private Server - 8 Replies
Okay so NOW I get these 2 problems in ma command prompt window of ma source...
2 problems:
I really need help since I dunno wtf is the problem on 1 and 2...I'd appreciate it!
|
[Problems] Source 5165 All Problems
11/28/2009 - CO2 Private Server - 7 Replies
Hello Everyone, Ok i will put All my problems here So i hope noone spamming and
Say Go learn C# and w/e
1-RegPage: fixed all by adding to the start of the pass and to the end of the pass.
its working okay and when i create character and try to rejoin the game close with itself
Note: When i make From NewestCOServer Cmd it works fine and the game dont close i mean i want other players to make thier own accounts and dont ask me to make them The Accounts they want.
2-Lottery: Cant...
|
[Problems]Having problems in Cabal Wudijt
07/01/2008 - Cabal Online - 0 Replies
1>im having problems in registering in Wudijt can anyone help me give me working link
2>i cant seem to update my red cabal online is it offline?
3>when i load Cabal.exe the cabal window will just dissapear please help me,i followed everyone's advice but it doesnt work, can anyone tell me what the real problem?
thanks! ^_^
|
All times are GMT +1. The time now is 23:41.
|
|