Hello, I've been trying to create a "duplicate" of de points in the group I "demo_point" so I've created a copy of the script but Ichanged the "demo" for "park" the thing is that it doesn't starts the count I created
PARK_COSINE
PARK_COUNTER
PARK_POINTS_START_STOP
PARK_RANDOM
PARK_RATE_OF_CHANGE
PARK_SAWTOOTH
PARK_SINE
Points but I didn't create one for LOOP_COUNTER
the script looks like this
Sub Main()
Dim Park_Counter As New Point
Dim Park_Sine As New Point
Dim Park_Cosine As New Point
Dim Park_Rate_Of_Change As New Point
Dim Park_Toggle As New Point
Dim Park_Random As New Point
Dim Park_Sawtooth As New Point
Dim Park_Start_Stop As New Point
Dim Loop_Counter As New Point 'used to start and stop the demo points without resetting them
Dim I As Integer
Dim Rate As Integer 'used to control the rate at which the points change
Dim Flip As Boolean 'used for the sawtooth point
Park_Counter.Id = "PARK_COUNTER"
Loop_Counter.Id = "PARK_COUNTER"
Park_Sine.Id = "PARK_SINE"
Park_Cosine.Id = "PARK_COSINE"
Park_Rate_Of_Change.Id = "PARK_RATE_OF_CHANGE"
Park_Toggle.Id = "PARK_TOGGLE"
Park_Random.Id = "PARK_RANDOM"
Park_Sawtooth.Id = "PARK_SAWTOOTH"
Park_Start_Stop.Id = "PARK_POINTS_START_STOP"
Park_Start_Stop.OnChange
'This was set at 1000--but this puts to much strain on the system
Rate = (1000 / Park_Rate_Of_Change.GetValue) - 200
Park_Rate_Of_Change.OnChange
Flip = True
Loop_Counter.get ' Get the current value of the demo points
WAIT_FOR_START:
Park_Start_Stop.GetNext
If Park_Start_Stop.Value = 0 Then GoTo WAIT_FOR_START
Flip = Not(Flip)
Do While True
Flip = Not(Flip)
If Acquire("SET_PARK_POINTS",0) = False Then Exit Sub
For I = Loop_Counter.GetValue To 200
If Park_Start_Stop.GetNext(0) Then
End If
If Park_Start_Stop.Value = 0 Then GoTo WAIT_FOR_START
If Park_Rate_Of_Change.GetNext(0) Then
Rate = (1000 / Park_Rate_Of_Change.Value) - 200
End If
Randomize
Sleep Rate
Park_Counter.setvalue = I
Park_Sine.setvalue = Sin((I/50)*Pi) * 100
Park_Cosine.setvalue = Cos((I/50)*Pi) * 100
Park_Toggle.setvalue = I Mod 2
Park_Random.setvalue = Random(1,1000)
If Flip then
Park_Sawtooth.setvalue = I
Else
Park_Sawtooth.setvalue = 100 - I
End If
Next I
Loop_Counter.value = 1 'now we want to start from 1, so we reset the loop counter
Loop_Counter.set
Loop
Done:
Park_Start_Stop.Cancel
Park_Rate_Of_Change.Cancel
Release "SET_PARK_POINTS"
End Sub
Can anyone healp me please
PARK_COSINE
PARK_COUNTER
PARK_POINTS_START_STOP
PARK_RANDOM
PARK_RATE_OF_CHANGE
PARK_SAWTOOTH
PARK_SINE
Points but I didn't create one for LOOP_COUNTER
the script looks like this
Sub Main()
Dim Park_Counter As New Point
Dim Park_Sine As New Point
Dim Park_Cosine As New Point
Dim Park_Rate_Of_Change As New Point
Dim Park_Toggle As New Point
Dim Park_Random As New Point
Dim Park_Sawtooth As New Point
Dim Park_Start_Stop As New Point
Dim Loop_Counter As New Point 'used to start and stop the demo points without resetting them
Dim I As Integer
Dim Rate As Integer 'used to control the rate at which the points change
Dim Flip As Boolean 'used for the sawtooth point
Park_Counter.Id = "PARK_COUNTER"
Loop_Counter.Id = "PARK_COUNTER"
Park_Sine.Id = "PARK_SINE"
Park_Cosine.Id = "PARK_COSINE"
Park_Rate_Of_Change.Id = "PARK_RATE_OF_CHANGE"
Park_Toggle.Id = "PARK_TOGGLE"
Park_Random.Id = "PARK_RANDOM"
Park_Sawtooth.Id = "PARK_SAWTOOTH"
Park_Start_Stop.Id = "PARK_POINTS_START_STOP"
Park_Start_Stop.OnChange
'This was set at 1000--but this puts to much strain on the system
Rate = (1000 / Park_Rate_Of_Change.GetValue) - 200
Park_Rate_Of_Change.OnChange
Flip = True
Loop_Counter.get ' Get the current value of the demo points
WAIT_FOR_START:
Park_Start_Stop.GetNext
If Park_Start_Stop.Value = 0 Then GoTo WAIT_FOR_START
Flip = Not(Flip)
Do While True
Flip = Not(Flip)
If Acquire("SET_PARK_POINTS",0) = False Then Exit Sub
For I = Loop_Counter.GetValue To 200
If Park_Start_Stop.GetNext(0) Then
End If
If Park_Start_Stop.Value = 0 Then GoTo WAIT_FOR_START
If Park_Rate_Of_Change.GetNext(0) Then
Rate = (1000 / Park_Rate_Of_Change.Value) - 200
End If
Randomize
Sleep Rate
Park_Counter.setvalue = I
Park_Sine.setvalue = Sin((I/50)*Pi) * 100
Park_Cosine.setvalue = Cos((I/50)*Pi) * 100
Park_Toggle.setvalue = I Mod 2
Park_Random.setvalue = Random(1,1000)
If Flip then
Park_Sawtooth.setvalue = I
Else
Park_Sawtooth.setvalue = 100 - I
End If
Next I
Loop_Counter.value = 1 'now we want to start from 1, so we reset the loop counter
Loop_Counter.set
Loop
Done:
Park_Start_Stop.Cancel
Park_Rate_Of_Change.Cancel
Release "SET_PARK_POINTS"
End Sub
Can anyone healp me please