For example after running find image on screen I would have a variable as follows 1367,627,175,44,0
how can I parse that variable into 5 unique variables?
I.E.
x=1367
y=627
xDistance=175
yDistance=44
display=0
For example after running find image on screen I would have a variable as follows 1367,627,175,44,0
how can I parse that variable into 5 unique variables?
I.E.
x=1367
y=627
xDistance=175
yDistance=44
display=0
That link you included tells you sort-of how to do it. Reference that link, and then this:
It doesn't tell you which display - you'll have to figure that out from the coordinates.
Hope this helps.
You can also try the following example which will tell you the display number: examples.kmmacros (1.7 KB)
As the post by @DanThomas showed, you don't really need to parse the image coordinates since the individual coordinates, and some computed one, will always be available using the dot notation. See FoundImage Token .
If you have stored the image coordinates in the KM Variable "ImageLoc
", you can access the individual coordinate like this:
<KM Variable Name>.<Coordinate Property>
ImageLoc.MidX
If the KM Variable is a Global Variable, like the one I show above, then that variable will persist across Macros and even Mac restarts, and you will be able to refer to individual coordinates at any time in the future.
BTW, you can also use this notation in calculations.