Saturday, September 19, 2020

#26 2019-12-02 08:31:05 pm

TheIaMonLyOneHeRe
Member
Registered: 2018-09-16
Posts: 43

Re: Progress Panel as sheet

Applescript:

on openSheet:sender
theWindow's beginSheet:Window completionHandler:(missing value)
end openSheet:

I'm sorry, I'm slow to understand but I get there.
thanks, again!

Last edited by TheIaMonLyOneHeRe (2019-12-02 08:32:27 pm)

Offline

 

#27 2020-08-02 09:14:39 pm

TheIaMonLyOneHeRe
Member
Registered: 2018-09-16
Posts: 43

Re: Progress Panel as sheet

Shane Stanley wrote:

You call -endSheet:. It the window showing the sheet is mainWindow, then:

Applescript:

mainWindow's endSheet:(mainWindow's attachedSheet())



Could you tell me how I do the same using:

Applescript:

runModal ()

I tried:

Applescript:

stopModal ()

but to no avail here.

Offline

 

#28 2020-08-02 11:10:28 pm

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

Re: Progress Panel as sheet

Try:

Applescript:

current application's NSApp's stopModal()


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

Offline

 

#29 2020-08-03 05:28:52 pm

TheIaMonLyOneHeRe
Member
Registered: 2018-09-16
Posts: 43

Re: Progress Panel as sheet

Hey @Shane,

Unfortunately it didn't work for me.
I am currently displaying an Sheet Alert
as follows:

Applescript:

set alert to current application's NSAlert's alloc's init()
tell alert
its setAccessoryView:customView
its setMessageText:"blahblahblah"
its setInformativeText:"blahblahblah"
its setAlertStyle:1
its addButtonWithTitle:false
its setShowsSuppressionButton:false
its beginSheetModalForWindow:theWindow completionHandler:(missing value)
end tell

and to close automatically after the processes are completed I'm using what you suggested to me:

Applescript:

theWindow's endSheet:(theWindow's attachedSheet())

Worked very well until Catalina 10.15.6
but it looks like everything has changed in Big Sur, so
my desire to use

Applescript:

runModal ()

.

Offline

 

#30 2020-08-03 05:55:46 pm

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

Re: Progress Panel as sheet

Go here:

https://macosxautomation.com/applescrip … lpers.html

and add the alert stuff to your project.


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

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)