I'm filling in the gaps from the initial basic array, so if the entire Array is moved to Array 5 to 20, i use the values from the basic array 1 to 5 & copy them to the now empty Arrays 1 to 5, as the entire array has been moved to Array 5 to 20.
The script works great.
But it moves step by step, instead of the entire table updating at once, ie The entire basic array 1 to 20 moves from array5 to array6, it moves the entire basic to the new position step by step, ie the figures in array 1 to array 2, figures in array 2 to array 3 etc.,
Is it possible to move the entire array & fill in the missing arrays, as the basic array cascades down the table simultaneously? I've tried, but its too complex ...
Thanks!
Code: Select all
#SingleInstance, Force
SetFormat,Float,3.2
;Create Initial Array
Data := Object()
i:=109
NumberOfUnits:=40
Loop %NumberOfUnits%
{
i++
data[A_Index]:=i
}
Value := data[5]
x:=0
number:=0
YAxisInc:=24
StatusInc:=1
NumStatusInc:=1
NotShown := True ;gui has not yet been shown
loop
{
;Creates Initial Array In Gui As Guide Left Row
Loop, %NumberOfUnits%
{
x++ ;Increments by - to create 40 to 60
y1:=data[x]
YAxis:=number += YAxisInc ;Increments by 12 to create a gap of 12 between numbers
Gui,Add,Text,x160 y%YAxis%, %x% %y1%
}
;Create Variables To Show In Gui
;Outerloop Using OuterInc Cascades The Entire Initial Array From Array 1 To Array 20, Array 2 to Array 20 etc.,
;InnerLoopFill Creates An InnerLoop Using OuterInc To Fill In Gaps Created By Cascading The Initial Array
;If the Entire Initial Array gets displaced From Array 1 to Array 5 The InnerLoopLoop Fills Empty Values In Array 1 to 5 Using Values 1 to 5 From Initial Array
;Outerloop
;Outerloop Using OuterInc Cascades The Entire Initial Array From Array 1 To Array 20, Array 2 to Array 20 etc.,
OuterInc:=2
FillPreviousInc:=1
Loop %NumberOfUnits%
{
StartPointFill:=OuterInc-OuterInc +1
;InnerLoop
Datax := Object()
IncIncrease:=OuterInc
Loop %NumberOfUnits%
{
;Copies Values From Array data[1] to Datax[2], data[2] to Datax[3] etc.
Datax[IncIncrease] := data[A_Index]
IncIncrease++
;InnerLoopFill Creates An InnerLoop Using OuterInc To Fill In Gaps Created By Cascading The Initial Array
;If the Entire Initial Array gets displaced From Array 1 to Array 5 The InnerLoop Fills Empty Values In Array 1 to 5 Using Values 1 to 5 From Initial Array
InnerLoopFill:=0
Loop %OuterInc%
{
InnerLoopFill++
Datax[InnerLoopFill] := data[InnerLoopFill]
}
}
;Displays Created Cascade In Gui
x:=0
number:=0
YAxisInc:=YAxisInc
StatusInc:=1
NumStatusInc:=1
First:=!First++
Loop, %NumberOfUnits%
{
x++ ;Increments by + to create 40 to 60
y1:=Datax[x]
YAxis:=number += YAxisInc ;Increments by 12 to create a gap of 12 between numbers
IF NotShown
{
Gui, Font, s8
Gui, Add, Edit, w100 vPriceBought, %CurrentPrice%
Gui, Add, Edit, w100 vAmount, %Amount%
Gui,Add,Text,x360 w500 y%YAxis% vY%YAxis%, %y1%
}
Else
{
GuiControl,, Y%YAxis%, %y1%
Sleep, 500
}
}
If NotShown
Gui, Show,x1609 y186 w900 h1200, XGraph,% NotShown := False
OuterInc++
}
}
esc::
{
sleep 100
Send {LControl down}
sleep 100
Send {s}
sleep 100
Send {LControl up}
Reload
}
Return