Hi CookieMonster, I just copied the posted code and put it in a normal left click of a CTB and it ran fine. Make a new CTB and then in the edit box, provide a name and an icon and click on "edit" to the right of the "On left click" box and paste/insert the posted script. Another way would be to copy the script into a new script file and then just reference the new script file in the On left click edit box (e.g., load("<xyscripts>\MiscCommandsButton.xys");) Please make sure you have no spaces before the lines in the code since it's essentially a menu , the lines have to start at the beginning of the line. I only provided some of the buttons to minimize space.CookieMonster wrote:I copied the above code into a script button, when I ran the script I got errors, How do I add such a menu ?
As totmad1 suggested in his link and the link I provided, there are numerous ways, some much more advanced, to accomplish something similar to what you want. XY scripting can be very powerful.
Good luck,
Ken
XYplorer Beta Club