Code: Select all
z=
(join
86,85|87,86|88,87|89,88|90,89|91,89|92,90|93,91|94,91|95,92|96,93|97,93|98,94|99,94|100
,94|101,95|102,95|103,95|104,95|105,96|106,96|107,95|108,95|109,95|110,95|111,95|112,95|113
,95|114,94|115,94|116,94|117,93|118,93|119,92|120,92|121,91|122,90|123,90|124,89|125,88|126
,87|127,87|128,86|129,85|130,84|131,83|132,82|133,81|134,81|135,80|136,79|137,78|138,77|139
,76|140,75|141,75|142,74|143,73|144,72|145,72|146,71|147,70|148,70|149,69|150,69|151,68|152
,68|153,67|154,67|155,67|156,66|157,66|158,66|159,66|160,66|161,66|162,66|163,66|164,66|165
,66|166,66|167,67|168,67|169,67|170,68|171,68|172,69|173,69|174,70|175,70|176,71|177,72|178
,72|179,73|180,74|181,74|182,75|183,76|184,77|185,78|186,79|187,79|188,80|189,81|190,82|191
,83|192,84|193,85|194,86|195,86|196,87|197,88|198,89|199,89|200,90|201,91|202,91|203,92|204
,93|205,93|206,94|207,94|208,94|209,95|210,95|211,95|212,95|213,95|214,95|215,95|216,96|217
,96|218,95|219,95|220,95|221,95|222,94|223,94|224,94|225,93|226,93|227,92|228,92|229,91|230
,90|231,90|232,89|233,88|234,87|235,87|236,86|237,85|238,84|239,83|240,82|241,81|242,82
)
pos:={}
a:=strsplit(z,"|")
loop % a.maxindex()
{
b:=strsplit(a[A_Index],",")
pos[b[1]]:=b[2]
}
msgbox % pos[214]
The list contains x,y values , I want the "y" value when the array key is "x" .The code I could make looks too complicated but I cannot think about a better way
If anyone sees a simpler code , I would be grateful !