Re: Finder window - coordinates and screen?
Re: Finder window - coordinates and screen?
- Subject: Re: Finder window - coordinates and screen?
- From: "Finlay Dobbie" <email@hidden>
- Date: Mon, 25 Jun 2007 18:19:02 +0100
On 24/06/07, b UND d <email@hidden> wrote:
- is there a better/other way than using an NSAppleScript like this?
NSAppleScript *fmostWindow = [[NSAppleScript alloc]
initWithSource:@"tell application \"Finder\" to get bounds of window
1"];
Well, you'll be better off using a precompiled script, since you won't
experience a brief pause as OSA compiles it to AppleEvents.
- if not: how do I convert the resulting AppleScript coordinates in
cocoa coordinates and an info on which screen the Finder window
origin is?
I can't say I know offhand. You'll probably get a string back from
AppleScript, you'll probably want to parse that into a few floating
point numbers, then do the usual jiggery pokery to translate the
coordinate bases.
-- Finlay
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden