Saturday, December 16, 2017

#1 2009-11-09 07:32:28 pm

ttt1107
Member
Registered: 2009-08-14
Posts: 63

Lock other windows with one key

Is it possible to have only one window in the application to be able to be used and other ones to be locked like when you use "display dialog". Also have it beep if you try to use the other windows and it doesn't bring the other windows to the front but keeps that one window above the others.

Also I used:
on applicationShouldTerminateAfterLastWindowClosed_(sender)
        return true
end applicationShouldTerminateAfterLastWindowClosed_

And when I close one window and another is still open or if I use display dialog "" it closes the application even though there is one more window is left open.


Filed under: window, Lock, key, terminate

Offline

 

#2 2009-11-10 04:54:15 am

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 5200

Re: Lock other windows with one key

ttt1107 wrote:

Is it possible to have only one window in the application to be able to be used and other ones to be locked like when you use "display dialog".


You probably want beginModalSessionForWindow_.


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/

Offline

 

#3 2009-11-10 06:15:45 pm

ttt1107
Member
Registered: 2009-08-14
Posts: 63

Re: Lock other windows with one key

I tried that and the other window can still be brought to the front.

How would you write it to make it work for the window:
property mainwin :missing value

Last edited by ttt1107 (2009-11-11 05:35:12 pm)

Offline

 

#4 2009-11-13 11:54:05 pm

ttt1107
Member
Registered: 2009-08-14
Posts: 63

Re: Lock other windows with one key

does anyone know?

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)