Set a window of a running app to float on top

Hi, I’m new here (and to Applescript too).

I would like to have a given window to float on top of the others (something X on Linux allows you out of the box for every single window). I searched the forum but found only partial answers.

I tried this:

try
	tell application "Dictionary"
		set the level of window "Dictionary and Thesaurus" to 1
	end tell
end try

But it does not do the job. Any ideas?

Is it in fact possible to set a window property of any running app through Applescript?

Is there a specific app you were interested in? I’m assuming you were just using Dictonary as an example. Finder’s Window class has a Floating property.

Hi,

the Dictionary was indeed an example. I needed in first place to set this property for OmniOutliner Pro. Since I checked in the doc (found on this site, btw :cool:) there seems to be no such property for this application.

But it does’nt work either for the Dictionary, which would have been quite useful too. I tried this:

try
	tell application "Dictionary"
		set the floating of window 1 to true
	end tell
end try

but maybe I am wrong. Is is my first steps with AppleScript.

But isn’t there a way to tell every single window to float on the others? (I found a third party app (Application Enhancer + Window Shade) that does the job and more but I would like to be able to control windows in scripts.).

Hi,

I think, this is not possible with plain vanilla AppleScript
the window property floating is read only

PS: personally I distrust deeply these Unsanity haxies :wink:

Thanks.

(about Unsanity apps: so do I ;). Particularly their Application Enhancer component doesn’t make me feel at ease).

So what would you recommend apart from AS as a solution (I know this is more a macosxhints question :P)?