FROM : Ken Tozier
DATE : Sun Apr 03 11:04:07 2005
You might be able to do this with an AppleScript. You can ask the
finder for a list of application processes which you could then loop
through, sending a request for a list of documents. Once you have the
list of documents, you could use a try block to resize them. This would
most likely require a bit of trial and error to get the syntax right,
but the end result would be a legal, non-hackey way to accomplish what
you're trying to do.
On Apr 3, 2005, at 12:18 AM, Conrad Carlen wrote:
>
> On Apr 2, 2005, at 3:19 PM, Finlay Dobbie wrote:
>
>> On Apr 2, 2005 11:55 PM, Benjamin Blonder <<email_removed>> wrote:
>> Ideally I'd like to be able to somehow
>> convert the PIDs it returns into actual NSApplication pointers I could
>> then use to call the relevant resize methods. Right now though I'm
>> stumped as to how to do this. It seems like it ought to be possible -
>> any ideas?
>>
>> What makes you think it ought to be possible? It isn't.
>> There is no supported way to accomplish what you are trying to do.
>> Your best bet is the unsupported hacks like APE or SIMBL.
>
> Benjamin,
>
> For Cocoa, see NSObject's poseAsClass:(Class)aClass.
>
> poseAsClass is part of NSObject, is not deprecated, and thus not a
> "hack." What you do with it, to somebody else's app, may be another
> story. The bad part about poseAsClass is that there isn't a good way
> that I know of to use it in the context of somebody else's app. Input
> Managers have been used but that seems likely to break in the future
> if Input Manager modules are executed later than launch time - when it
> becomes too late to pose. Depending on how you use poseAsClass,
> particularly if you can find a way to use it without the Input
> Manager, it's not altogether evil - you'll probably have to revise
> your code whenever the app you're posing in changes, though.
>
> -Conrad
>
>>
>> -- Finlay
>>
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Cocoa-dev mailing list (<email_removed>)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>>
>> This email sent to <email_removed>
>> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/
> <email_removed>
>
> This email sent to <email_removed>
DATE : Sun Apr 03 11:04:07 2005
You might be able to do this with an AppleScript. You can ask the
finder for a list of application processes which you could then loop
through, sending a request for a list of documents. Once you have the
list of documents, you could use a try block to resize them. This would
most likely require a bit of trial and error to get the syntax right,
but the end result would be a legal, non-hackey way to accomplish what
you're trying to do.
On Apr 3, 2005, at 12:18 AM, Conrad Carlen wrote:
>
> On Apr 2, 2005, at 3:19 PM, Finlay Dobbie wrote:
>
>> On Apr 2, 2005 11:55 PM, Benjamin Blonder <<email_removed>> wrote:
>> Ideally I'd like to be able to somehow
>> convert the PIDs it returns into actual NSApplication pointers I could
>> then use to call the relevant resize methods. Right now though I'm
>> stumped as to how to do this. It seems like it ought to be possible -
>> any ideas?
>>
>> What makes you think it ought to be possible? It isn't.
>> There is no supported way to accomplish what you are trying to do.
>> Your best bet is the unsupported hacks like APE or SIMBL.
>
> Benjamin,
>
> For Cocoa, see NSObject's poseAsClass:(Class)aClass.
>
> poseAsClass is part of NSObject, is not deprecated, and thus not a
> "hack." What you do with it, to somebody else's app, may be another
> story. The bad part about poseAsClass is that there isn't a good way
> that I know of to use it in the context of somebody else's app. Input
> Managers have been used but that seems likely to break in the future
> if Input Manager modules are executed later than launch time - when it
> becomes too late to pose. Depending on how you use poseAsClass,
> particularly if you can find a way to use it without the Input
> Manager, it's not altogether evil - you'll probably have to revise
> your code whenever the app you're posing in changes, though.
>
> -Conrad
>
>>
>> -- Finlay
>>
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Cocoa-dev mailing list (<email_removed>)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>>
>> This email sent to <email_removed>
>> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/
> <email_removed>
>
> This email sent to <email_removed>
| Related mails | Author | Date |
|---|---|---|
| Benjamin Blonder | Apr 3, 00:55 | |
| Finlay Dobbie | Apr 3, 01:19 | |
| Ondra Cada | Apr 3, 01:40 | |
| Finlay Dobbie | Apr 3, 01:49 | |
| Bill Cheeseman | Apr 3, 02:00 | |
| Olivier Lanctôt | Apr 3, 07:02 | |
| Conrad Carlen | Apr 3, 07:18 | |
| Ken Tozier | Apr 3, 11:04 | |
| Mike Hall | Apr 3, 11:27 | |
| Ondra Cada | Apr 3, 11:54 | |
| Ken Tozier | Apr 3, 12:45 |






Cocoa mail archive

