Hi swagfag, it was my understanding that this use of classes would require a fair bit more typing (you will understand what I mean when you see the length below), and in two sections (in 'root := new State' as well as 'which hotkey pressed').
I had success enough with the first solution for the past two weeks, to even be able to expand the scope of my work. However, I ran into one of the many issues you were alluding to, namely 'expression being too large'.
If you could help me with a simple solution to rectify this, perhaps by joining more arrays together, it would help me the most. However, if we cannot, could you kindly help me with extracting the output from perform() above and adapting them into my 'sendchart' functionality below?:
Code: Select all
ch1:=1
ch2:=113
strt := "1,113"
ForLButtonNotHold := ["1,113","1,153","1,113","9,121","9,153","9,121","17,129","17,152","17,129","25,137","25,153","25,137","33,113","33,161","33,113","41,121","41,161","41,121","49,129","49,161","49,129","57,145","57,161","57,145","65,121","65,169","65,121","73,121","73,177","73,121","81,121","81,185","81,121","89,129","89,169","89,129","89,129","89,185","89,129","97,129","97,185","97,129","105,137","105,169","105,137","2,114","2,154","2,114","10,122","10,154","10,122","18,130","18,153","18,130","26,138","26,154","26,138","34,114","34,162","34,114","42,122","42,162","42,122","50,130","50,162","50,130","58,146","58,162","58,146","66,122","66,170","66,122","74,122","74,178","74,122","82,122","82,186","82,122","90,130","90,170","90,130","90,130","90,186","90,130","98,130","98,186","98,130","106,138","106,170","106,138","3,115","3,155","3,115","11,123","11,155","11,123","19,131","19,154","19,131","27,139","27,154","27,138","35,115","35,163","35,115","43,123","43,163","43,123","51,131","51,163","51,131","59,147","59,163","59,147","67,123","67,171","67,123","75,123","75,179","75,123","83,123","83,187","83,123","91,131","91,171","91,131","91,131","91,187","91,131","99,131","99,187","99,131","107,139","107,171","107,139","4,116","4,156","4,116","12,124","12,156","12,124","20,132","20,155","20,132","28,140","28,154","28,138","36,116","36,164","36,116","44,124","44,164","44,124","52,132","52,164","52,132","60,148","60,164","60,148","68,124","68,172","68,124","76,124","76,180","76,124","84,124","84,188","84,124","92,132","92,172","92,132","92,132","92,188","92,132","100,132","100,188","100,132","108,140","108,172","108,140","5,117","5,157","5,117","13,125","13,157","13,125","21,133","21,156","21,133","29,141","29,154","29,138","37,117","37,165","37,117","45,125","45,165","45,125","53,133","53,165","53,133","61,149","61,165","61,149","69,125","69,173","69,125","77,125","77,181","77,125","85,125","85,189","85,125","93,133","93,173","93,133","93,133","93,189","93,133","101,133","101,189","101,133","109,141","109,173","109,141","6,118","6,158","6,118","14,126","14,158","14,126","22,134","22,157","22,134","30,142","30,154","30,138","38,118","38,166","38,118","46,126","46,166","46,126","54,134","54,166","54,134","62,150","62,166","62,150","70,126","70,174","70,126","78,126","78,182","78,126","86,126","86,190","86,126","94,134","94,174","94,134","94,134","94,190","94,134","102,134","102,190","102,134","110,142","110,174","110,142","7,119","7,159","7,119","15,127","15,159","15,127","23,135","23,158","23,135","31,143","31,154","31,138","39,119","39,167","39,119","47,127","47,167","47,127","55,135","55,167","55,135","63,151","63,167","63,151","71,127","71,175","71,127","79,127","79,183","79,127","87,127","87,191","87,127","95,135","95,175","95,135","95,135","95,191","95,135","103,135","103,191","103,135","111,143","111,175","111,143","8,120","8,160","8,120","16,128","16,160","16,128","24,136","24,159","24,136","32,144","32,154","32,138","40,120","40,168","40,120","48,128","48,168","48,128","56,136","56,168","56,136","64,152","54,168","64,152","72,128","72,176","72,128","80,128","80,184","80,128","88,128","88,192","88,128","96,136","96,176","96,136","96,136","96,192","96,136","104,136","104,192","104,136","112,144","112,176","112,144"]
sendcharts:
WinGet, winList, List, ahk_class Afx:0000000140000000:0:0000000000010005:0000000000000000:0000000000000000
Loop % winList
WinMenuSelectItem, % "ahk_id " winList%a_index%, , CW, %ch2%&
WinGet, winList, List, ahk_class Afx:0000000140000000:0:0000000000010005:0000000000000000:0000000000000000
Loop % winList
WinMenuSelectItem, % "ahk_id " winList%a_index%, , CW, %ch1%&
return
Left::
{
for x,y in ForLButtonNotHold
if (y = strt)
{
z := x = ForLButtonNotHold .count() ? 0 : x
strt := ForLButtonNotHold [z+1]
rslt := strt
break
}
else
rslt := ""
ch := StrSplit(strt,",")
ch1 := ch.1
ch2 := ch.2
gosub sendcharts
return
}