Code: Select all
obj := { Time: Value }
;or less ideal
arr[ Index ] := "Time|Value"
Code: Select all
string .= "Time|Value" ";"
Code: Select all
obj := { Time: Value }
;or less ideal
arr[ Index ] := "Time|Value"
Code: Select all
string .= "Time|Value" ";"
Code: Select all
obj := {}, n := 2000000, tip := 250, i := 0, start := A_TickCount
Loop, %n% {
last := obj[A_Now ++i] := A_Index * 1.5
If (A_Index / tip = A_Index // tip)
ToolTip, %A_Index%, 300, 300
}
SoundBeep, 1000
ToolTip
MsgBox, 64, Last item (n=%n%), % last "`nElapsed: " (A_TickCount - start) / 1000 " seconds"
unless u explain what ur concerns and intentions are, i cant say anything
Thank you. I had caught your last post. P.S yes it worked.mikeyww wrote: ↑25 Sep 2021, 14:41The following script ran without error.
Output:Code: Select all
obj := {}, n := 2000000, tip := 250, i := 0, start := A_TickCount Loop, %n% { last := obj[A_Now ++i] := A_Index * 1.5 If (A_Index / tip = A_Index // tip) ToolTip, %A_Index%, 300, 300 } SoundBeep, 1000 ToolTip MsgBox, 64, Last item (n=%n%), % last "`nElapsed: " (A_TickCount - start) / 1000 " seconds"
image210925-1541-001.png
Code: Select all
#If ( Active )
~$*LButton::
if( CurrentMin != A_Min ){ ;if it is a new min create a new array to record the clicks in that min.
CurrentMin := A_Min
Clicks[ CurrentMin ] := []
}
Clicks[ CurrentMin ].Push( A_Sec ) ;Push a timestamp of the second the click happend.
return
#If
Code: Select all
Clicks := []
~*LButton::Clicks[A_Now] := (0 Clicks[A_Now]) + 1
F3::
start := Clicks.Count(), Clicks := purge(Clicks, 20210925192835)
MsgBox, 64, Purged, % start " -> " Clicks.Count()
Return
purge(Clicks, minTime) {
minTime += -1, S
Clicks.Delete(20200101000000, minTime)
Return Clicks
}
I have decided to go beyond just making a demo with it. The code from the other thread was mainly for a simple demo of some sort of graphing
That looks good, I'm rather lacking in my time manipulation skills. How would you go about tapping into that stream at these points.I imagine that you just need something like this.
Code: Select all
Clicks := [] ~*LButton::Clicks[A_Now] := (0 Clicks[A_Now]) + 1
Code: Select all
;This needs connecting to the stream
Obj.Display := [] ; x amount get initialized ( 1 or 2 mins )
;******
;******
;add stuff to the display array
;******
;******
DrawStuff() ;not related.
Code: Select all
Clicks := []
~*LButton::Clicks[now := A_Now] := (0 Clicks[now]) + 1 ; Store the cps for this time
F3::range := keep(Clicks, 20210926074000, 20210926074005) ; Keep only the range of times indicated
keep(Clicks, minTime, maxTime := False) { ; Discard times outside the range indicated
; A null maxTime will discard only times before minTime
range := Clicks.Clone()
minTime += -1, S ; Subtract one second
range.Delete(0, minTime) ; Delete times earlier than the minTime
If maxTime { ; If maxTime was specified,
maxTime += 1, S ; then add one second,
range.Delete(maxTime, 21000101000000) ; and delete times later than the maxTime
}
MsgBox, 64, Change in count ; Show the change in count of array elements
, % Clicks.Count() " -> " range.Count()
Return range
}
Thanks. I played around with adjusting time and I have a decent grasp now.