Check for visibility of Palette


is it possible to check or modify the visibility of a palette through applescript or another scripting language?
I know its possible to check for the enabled status though..

What im trying to accomplish is that im renaming a macro via applescript. That works fine.
But since that leads to the palette hiding i need to make it visible again. Thats fine so far but it would be better if i could check for the visibility status and pause the script until its hidden -> then continue the script with showing the palette again. At the moment i use a timed pause which sometimes work and sometimes doesn't.

I had a similar issue when adding macros to a palette. Peter solved it in the following post:

Thanks alot for that ultra fast reply! Works like a charm :smiling_face_with_three_hearts: