Hi! In my script I have a listbox, a button to add items and a button to remove items.
When the user presses the remove button I have a confirm-box asking if the user wants to remove, but I want this to only come up if anything is selected, else I want nothing to happen.
I have tried "my_palette.grp.lastRow.g02.RQ.selection.length != 0" but anything with .selection seems to make the script stop. After pressing the removebutton with nothing selected I can't add new items without restarting the script. My guess is becuase I'm trying to access .selection without it existing.
Does anyone know any other way to make sure that something is selected in the listbox?