window always on top

Hi there,

I’m developing a small app using applescript studio with a simple UI and I’m facing a problem I can’t solve even if I searched in this and others forums/mailng list.

I have a big window with a table with severals rows (all my itunes albums). Besides this table there is another smaller window with an image view inside that show artwork.

the two windows are indipendent each other so I can’t simply insert the image view in the main window.

I’ve done this way to make a simple “carousel” effect. the smaller window has a repeat loop to change image view position until is completely out of the window hiding the image.

The problem is when I click on any row of the table the main (bigger) window became the front window hiding the smaller window and its content.

There is a way to set a window to be always on top when visible is true?

Thanks in advance,

I’m not sure if this is what you want but if I remember it good there’s this command :

set level of window "myWindow" to 1

If this command gives an error, I’ll search for the AppleScript where I used it in and see if it’s the correct syntax. Because I’m not 100% sure it was that command.

Anyway, it could be that you’re trying something completely different…

Just use a panel for the image view instead of a window. If you have the “utility” checkbox checked in the attributes inspector it will stay on top.

thanks to both. set level works fine.


I tried set level of window “typed in window name” to 1 and got an error. Does this need to be inside a tell for something? I can’t figure it out and I can’t figure out anywhere in the documentation where I can find this info… Thank you

This is an awesome topic, I learned the set level technique from here. However it it does not work for me. May you lease see my post in this topic -

Consider that the original post is from 2009 and AppleScript Studio (the AppleScript developer environment in Xcode) has been abandoned around the same time.

Aw darn. Is there any equivalent for set always on top these days? Thanks StefanK for reply.