[Pythonmac-SIG] Dialogs
Jack Jansen
Jack.Jansen at cwi.nl
Wed Aug 6 17:50:52 EDT 2003
On Wednesday, Aug 6, 2003, at 16:11 Europe/Amsterdam, Bill Bedford
wrote:
> On Wed, 6 Aug 2003 15:05:52 +0200, Jack Jansen wrote:
>>
>> On Wednesday, Aug 6, 2003, at 13:33 Europe/Amsterdam, Bill Bedford
>> wrote:
>>
>>> Could anyone suggest a way of bring a Easydialog to the front after
>>> using another application?
>>
>> You need to be a bit more specific. Did the user bring Python back to
>> front, and
>> you want to cater for the dialog being obscured by other windows? If
>> so, that
>> would need a fix in EasyDialogs, as the dialogs there are all modal.
>>
>> Or are you looking for something else?
>
> I have a script that brings another app to the front and then puts up
> Easydialogs. In OS9 I could bring python to the front by calling
> get/setFrontProcess via calldll, but I can't see any equivalent for
> Carbon
That's indeed what you want to do. Unfortunately the process manager
isn't exported through the Carbon modules yet, and calldll doesn't yet
work on OSX (for Mach-O, at least).
There is a hack, but it will only work once: call MacOS.WMAvailable().
The first time you call this it will try
GetCurrentProcess/SetFrontProcess,
but unfortunately for this use case it caches the result in a static
variable.
Something you could try is send yourself an "activate" AppleEvent.
--
Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma
Goldman
More information about the Pythonmac-SIG
mailing list