Monday, December 9, 2019

#1 2019-11-18 09:44:05 am

SeekWisdom
Member
Registered: 2019-10-05
Posts: 9

How to display a progress bar in an AppleScript Xcode application.

I've been using the built-in Applescript progress bar script as outlined here:

https://developer.apple.com/library/arc … gress.html

and it works great unless I try to use it in an Xcode AppleScript app. Do I need to add a permission or library or something to get it to work in Xcode?

Offline

 

#2 2019-11-20 01:21:40 pm

SeekWisdom
Member
Registered: 2019-10-05
Posts: 9

Re: How to display a progress bar in an AppleScript Xcode application.

To clarify, this script works great as an app made from Script Editor, but it doesn't work if you add the code to an Xcode Applescript application:

Applescript:

set theImages to 5

-- Update the initial progress information
set theImageCount to 5
set progress total steps to theImageCount
set progress completed steps to 0
set progress description to "Processing Items..."
set progress additional description to "Preparing to process."

repeat with a from 1 to theImageCount
   -- Update the progress detail
   set progress additional description to "Processing item " & a & " of " & theImageCount
   
   -- Increment the progress
   set progress completed steps to a
   
   -- Pause for demonstration purposes, so progress can be seen
   delay 1
end repeat

-- Reset the progress information
set progress total steps to 0
set progress completed steps to 0
set progress description to ""
set progress additional description to ""

Offline

 

#3 2019-11-20 04:46:32 pm

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

Re: How to display a progress bar in an AppleScript Xcode application.

You have to build your own dialog in an Xcode project.


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

Offline

 

#4 2019-11-20 06:31:07 pm

SeekWisdom
Member
Registered: 2019-10-05
Posts: 9

Re: How to display a progress bar in an AppleScript Xcode application.

Interesting! Is there another option to be able to do a communicate progress via some sort of AppleScript dialog that a newb like me would be able to handle? smile

Last edited by SeekWisdom (2019-11-20 06:45:19 pm)

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)