Skip navigation.
 
mlRe: Calling methods on other applications?
FROM : Mike Hall
DATE : Sun Apr 03 11:27:56 2005

----- Original Message -----
  From: Ken Tozier
  To: Cocoa Dev Dev
  Sent: Sunday, April 03, 2005 4:04 AM
  Subject: Re: Calling methods on other applications?


  You might be able to do this with an AppleScript

As I remember you definitely can do this with AppleScript, I think Finder scripting so thats the AppleScript dictionary you'd want to look at, probably all the Window manipulation you need although it does require care.
I used to mess around with my own application on my PowerBook at work during the lunch hour. One day I was trying to come up with some AppleScript code that would launch and run some AppleScripts against an application without this being apparent to the user. I thought strange applications popping up might be somewhat disconcerting. So I was trying to move the launched applications window offscree.
This is a sort of valid java trick where a frame is required in order to have a top of screen menubar. If you just want the menu bar you can keep an owning window frame offscreen and hidden.
OK, so  I'm tinkering with this same idea with AppleScript and moving real live Finder windows off to the dark side of the moon when I realize that in testing sometimes I'm grabbing incorrect windows like open folder ones and sticking them where they'll never be seen again.
I think by the end of lunch I had changed the script to get everything back in view (but who knows). I pretty much scrapped the idea at that point though finding the possibility of some bug leaving invisible windows all over the place too disconcerting.
So you could probably manage it with AppleScript but when you start using it from an application to mess with other applications stuff you need to be careful and still its a bit like tresspassing.

Mike Hall          mikehall at spacestar dot net
http://www.spacestar.net/users/mikehall

Related mailsAuthorDate
mlCalling methods on other applications? Benjamin Blonder Apr 3, 00:55
mlRe: Calling methods on other applications? Finlay Dobbie Apr 3, 01:19
mlRe: Calling methods on other applications? Ondra Cada Apr 3, 01:40
mlRe: Calling methods on other applications? Finlay Dobbie Apr 3, 01:49
mlRe: Calling methods on other applications? Bill Cheeseman Apr 3, 02:00
mlRe: Calling methods on other applications? Olivier Lanctôt Apr 3, 07:02
mlRe: Calling methods on other applications? Conrad Carlen Apr 3, 07:18
mlRe: Calling methods on other applications? Ken Tozier Apr 3, 11:04
mlRe: Calling methods on other applications? Mike Hall Apr 3, 11:27
mlRe: Calling methods on other applications? Ondra Cada Apr 3, 11:54
mlRe: Calling methods on other applications? Ken Tozier Apr 3, 12:45