Saturday, December 3, 2022

#51 2017-01-08 02:19:27 pm

StefanK
Member
From:: St. Gallen, Switzerland
Registered: 2006-10-21
Posts: 11777
Website

Re: SKProgressBar 1.0, a fully scriptable progress bar

Oops, my bad.

Indeed the line to set the frame origin was missing.

It's fixed in SKProgressBar 1.6.1


regards

Stefan

Offline

 

#52 2017-01-09 12:17:41 am

jean.o.matic
Member
From:: Montréal, Québec, Canada
Registered: 2009-10-05
Posts: 13

Re: SKProgressBar 1.0, a fully scriptable progress bar

Thanks Stefan for super fast reply and reaction!
Sorry to say, version 1.6.1 does not run on El Capitan [Une erreur de type -10810 est survenue.].
An error of type -10810 has happened.
Same with demo script bundled with version 1.6 dmg.
Reverting to 1.6 for now, and works as expected, except for minor flaw.

Jean.O.matiC


______________________
Jean.O.matiC
Montréal, Québec, Canada

Offline

 

#53 2017-01-09 01:58:43 am

StefanK
Member
From:: St. Gallen, Switzerland
Registered: 2006-10-21
Posts: 11777
Website

Re: SKProgressBar 1.0, a fully scriptable progress bar

Try to resolve the 10810 error with the suggestions in this article:

http://www.thexlab.com/faqs/error-10810.html


regards

Stefan

Offline

 

#54 2017-01-09 08:25:24 am

jean.o.matic
Member
From:: Montréal, Québec, Canada
Registered: 2009-10-05
Posts: 13

Re: SKProgressBar 1.0, a fully scriptable progress bar

Stefan,
Thanks for the link, it was a long time since I browsed that site. Restarted Mac and did some testing. No Applications running but Script Editor, Finder, Quicktime (for video capture). Video was captured w/o sound to show script working with version 1.6, not working with 1.6.1 then working again with 1.6.
Simply said version 1.6.1 can't launch on my Mac.
Mac OS X ElCapitan 10.11.6 [Build 15G1212]
https://youtu.be/zGQctJemb2o

Jean.O.matiC

Model: MacBook Pro 15 in. Late 2008
AppleScript: 2.5

Last edited by jean.o.matic (2017-01-09 08:26:44 am)


______________________
Jean.O.matiC
Montréal, Québec, Canada

Offline

 

#55 2017-01-09 10:47:05 am

StefanK
Member
From:: St. Gallen, Switzerland
Registered: 2006-10-21
Posts: 11777
Website

Re: SKProgressBar 1.0, a fully scriptable progress bar

It might be that I used the wrong option to sign the application.

I created a new build (40), re-checked the deployment target, archived the app using the correct option and made an disk image like the other versions.

It's available at the same link.


regards

Stefan

Offline

 

#56 2017-01-09 12:06:41 pm

jean.o.matic
Member
From:: Montréal, Québec, Canada
Registered: 2009-10-05
Posts: 13

Re: SKProgressBar 1.0, a fully scriptable progress bar

Stefan, I must say I am very impressed!
Everything is OK now.
I can now save position of progress bar so it re-appears as it was placed on last run of script.

Thank you very, very much!

Best wishes for 2017,
Jean.O.matiC

Last edited by jean.o.matic (2017-01-15 01:34:20 pm)


______________________
Jean.O.matiC
Montréal, Québec, Canada

Offline

 

#57 2017-01-11 04:06:14 pm

StefanK
Member
From:: St. Gallen, Switzerland
Registered: 2006-10-21
Posts: 11777
Website

Re: SKProgressBar 1.0, a fully scriptable progress bar

[ANN] SKProgressBar 1.6.2

Changes :

- Got rid of the last Carbon relict, the AppleScript point type which was mapped to old QuickDraw Point.
In Swift this required a ObjC bridge header because Carbon Point is not available in Swift.
Version 1.6.2 maps the point in the position property to NSValue.

- Some minor optimizations.

Download: SKProgressBar 1.6.2

Last edited by StefanK (2017-01-17 01:48:47 am)


regards

Stefan

Offline

 

#58 2017-01-16 07:55:50 pm

jean.o.matic
Member
From:: Montréal, Québec, Canada
Registered: 2009-10-05
Posts: 13

Re: SKProgressBar 1.0, a fully scriptable progress bar

Hi Stefan!

The link to the latest version is broken.

http://www.klieme.com/Downloads/SKProgr … r1.6.2.zip
gives error 404.
Would be nice to have another link on the main page of your site [http://www.klieme.com].

Jean.O.matiC


______________________
Jean.O.matiC
Montréal, Québec, Canada

Offline

 

#59 2017-01-17 01:50:08 am

StefanK
Member
From:: St. Gallen, Switzerland
Registered: 2006-10-21
Posts: 11777
Website

Re: SKProgressBar 1.0, a fully scriptable progress bar

I edited the post and fixed the link.


regards

Stefan

Offline

 

#60 2019-10-04 05:09:16 am

alitaliano
Member
Registered: 2010-10-12
Posts: 35
Website

Re: SKProgressBar 1.0, a fully scriptable progress bar

Hi all,
Is it possible to use SKProgressBar together with a shell script that uploads ONE file and see the uploading progress for this file ?

Applescript:


set shellscript to "curl -u " & ftp_name & ":" & ftp_pw & " -T " & thisPOSIXfile & " " & fileURL
do shell script shellscript

Thanks for your answers !

Offline

 

#61 2019-10-05 02:51:10 am

StefanK
Member
From:: St. Gallen, Switzerland
Registered: 2006-10-21
Posts: 11777
Website

Re: SKProgressBar 1.0, a fully scriptable progress bar

No, it's not possible. You need a loop to increment the counter


regards

Stefan

Offline

 

#62 2019-10-06 01:07:41 pm

StefanK
Member
From:: St. Gallen, Switzerland
Registered: 2006-10-21
Posts: 11777
Website

Re: SKProgressBar 1.0, a fully scriptable progress bar

[Ann] Version 1.8, updated to Swift 5 with Catalina and Dark Mode support.

SKProgressBar is code signed and notarized.

Link: SKProgressBar1.8


regards

Stefan

Offline

 

#63 2019-12-03 09:01:27 am

BabyG
Member
Registered: 2019-11-25
Posts: 18

Re: SKProgressBar 1.0, a fully scriptable progress bar

SKProgressBar is a godsend! I had been using ProgBar as my progress bar, but it is no longer functional under Catalina. After some searching for a substitute, I came upon SKPB, and my prayers were answered!

I especially love the ability to include images in the bar. I have a question regarding that - is there any way to make the image field larger? App icons show up great in the bar, but images from JPEGs et al are often too tiny to be recognizable.

Thanks for providing this!

Offline

 

#64 2020-02-28 04:17:27 pm

JMichaelTX
Member
From:: Houston, TX (The Woodlands)
Registered: 2014-07-12
Posts: 142

Re: SKProgressBar 1.0, a fully scriptable progress bar

StefanK wrote:

[Ann] Version 1.8, updated to Swift 5 with Catalina and Dark Mode support.

SKProgressBar is code signed and notarized.

Link: SKProgressBar1.8



Thanks for the update, but it won't run for me, running Script Debugger 7.0.11 (7A106) on macOS 10.14.6 (Mojave).

I get this error running your demo SKProgressbarDemo.scpt:

SKProgressBar got an error: Can’t set «class hDsZ» of main bar to «constant hfSZrgSZ».
«class hDsZ» of main bar



on this line:

Applescript:


set «class hDsZ» to «constant hfSZrgSZ» --> default is small

How do I fix it?

Just for reference, here is the entire script:

Applescript:


property currentValue : 0.0
property maxValue : 10.0

set iconPath to (path to applications folder as text) & "iTunes.app:Contents:Resources:iTunes.icns"

tell application "SKProgressBar"
   activate
   
   ---------------------------------------------------
   --    SETUP WINDOW THAT CONTAINS ALL PROGRESS BARS --
   ---------------------------------------------------
   set title to "Demo of SKProgressBar 1.6" --> default is "SKProgressBar"
   
   set floating to false --> default is true
   set position to {100, 100} --> default is {1000, 750}, origin point is bottom left
   set width to 400.0 --> default is 500.0
   
   ---------------------------------------------------
   --    SETUP MAIN PROGRESS BAR --
   -- (progress bar 1 by definition)
   ---------------------------------------------------
   --    It already exists, so no need to create
   
   tell main bar --main bar
       
       set minimum value to 0.0 --> default is 0.0
       set maximum value to maxValue --> default is 100.0
       set current value to currentValue --> default is 0.0
       
       -- header / footer properties
       set header to "MAIN Progress Bar" --> default is empty string
       set header alignment to center --> default is left
       set «class hDsZ» to «constant hfSZrgSZ» --> default is small
       set footer to "footer" --> default is empty string
       set footer alignment to center --> default is left
       set «class fTsZ» to «constant hfSZmiSZ» --> default is small
       
       -- image path can be HFS or POSIX path, default is missing value (no image)
       set image path to iconPath
       
   end tell
   
   ---------------------------------------------------
   --    CREATE & SETUP PROGRESS BAR #2 --
   ---------------------------------------------------
   
   set progressBar2 to make new progress bar at after progress bar 1 with properties {header:"TEST Progress Bar #2", header alignment:center}
   tell progressBar2
       set maximum value to maxValue
       set current value to currentValue
   end tell
   
   
   ---------------------------------------------------
   --    DISPLAY/ACTIVATE THE PROGRESS BARS --
   ---------------------------------------------------
   --    This will show one window will all progress bars
   
   set show window to true --> default is false
   
   tell main bar
       set indeterminate to false
       start animation
   end tell
   
   repeat 10 times
       my resetMainBar()
       tell progressBar2
           if current value is 1.0 then
               set indeterminate to false
               start animation
           end if
       end tell
       repeat 10 times
           tell main bar to increment by 1
           delay 1
       end repeat
       tell progressBar2 to increment by 1
   end repeat
   tell main bar to stop animation
   tell progressBar2 to stop animation
   
   quit -- This quits the SKProgressBar app, closing all Progress Bars
   
end tell

on resetMainBar()
   tell application "SKProgressBar"
       tell main bar
           set maximum value to maxValue
           set current value to currentValue
       end tell
   end tell
end resetMainBar

Model: 2019 iMac-27
Browser: Safari 537.36
Operating System: macOS 10.14


2019 iMac-27 512GB SSD, 3.6Ghz i9 CPU, 40GB RAM
macOS 10.14.6 (Mojave)

Offline

 

#65 2021-06-07 01:14:09 am

StefanK
Member
From:: St. Gallen, Switzerland
Registered: 2006-10-21
Posts: 11777
Website

Re: SKProgressBar 1.0, a fully scriptable progress bar

[Ann] Version 1.9, compiled for Intel and M1 (Universal)

SKProgressBar1.9

@JMichaelTX. Sorry, I didn't notice your post. Delete all old versions of SKProgressBar to avoid the terminology clash.


regards

Stefan

Offline

 

#66 2022-09-22 08:04:54 am

roustoubi
Member
Registered: 2021-04-14
Posts: 5

Re: SKProgressBar 1.0, a fully scriptable progress bar

Hi Stefan,
trying to use SKProgressBar1.9 to display several progress bars about some nested processes for my scripts, I encounter a problem as soon as I try to add a 3rd progress bar. Working with a copy of your demo script, I get an AppleScript Execution Error saying "Erreur dans SKProgressBar : Le gestionnaire AppleEvent a échoué." and a -10000 error code (errAEEventFailed) as soon as I reach the extra line

Applescript:

set progressBar3 to make new progress bar at after progress bar 2 with properties {header:"EXTRA Progress Bar #3"}

I've added after 'CREATE & SETUP PROGRESS BAR #2' block and before 'DISPLAY/ACTIVATE THE PROGRESS BARS' one.
Did I misunderstand that number of progress bars was potentially unlimited, and if not, do you have any idea of what is going wrong?
Thanks a lot.

Offline

 

#67 2022-09-26 06:34:45 am

roustoubi
Member
Registered: 2021-04-14
Posts: 5

Re: SKProgressBar 1.0, a fully scriptable progress bar

Digging around encountered problem, I made some further tests. It is indeed possible to have more than 2 progress bars in window, but there's definitely something weird around progress bar 2 when we try to have 3 or more of them.

This leads to a -1000 error

Applescript:


tell application "SKProgressBar"
   set ProgressBar2 to make new progress bar at after progress bar 1 with properties {header:"2nd"} --> OK
   set ProgressBar3 to make new progress bar at after progress bar 2 with properties {header:"3rd"} --> error -1000
end tell

While this executes without error

Applescript:


tell application "SKProgressBar"
   set ProgressBar2 to make new progress bar at after progress bar 1 with properties {header:"2nd"} -- OK
   set ProgressBar3 to make new progress bar at before progress bar 2 with properties {header:"3rd"} -- OK
   -- set ProgressBar4 to make new progress bar at after progress bar 3 with properties {header:"4th"} --> error -1000
   set ProgressBar4 to make new progress bar at after progress bar 2 with properties {header:"4th"} -- OK
   set AllProgressBars to every progress bar
   set show window to true
end tell

3 progress bars are created besides main, but both ProgressBar2 and ProgressBar3 have 'progress bar 2' object as value and window seems to display the 3 extra-bars as the same, all with '2nd header'. However

Applescript:

every progress bar

do return 4 different objects: main as progress bar 1, named '3rd' as progress bar 2, named '4th' as progress bar 3 and named '2nd' as progress bar 4 (quite logical considering location set in make commands).

All that said, considering my need of 6 progress bars for 6 parallels processes, I've ended up with the following:

Applescript:


tell application "SKProgressBar"
   repeat with i from 1 to 7
       make new progress bar at after progress bar 1 with properties {header:"#"}
   end repeat
   set progress bar 1's header to "Bar 1"
   set progress bar 2's header to "Bar 2" -- not displayed
   set progress bar 3's header to "Bar 3"
   set progress bar 4's header to "Bar 4"
   set progress bar 5's header to "Bar 5"
   set progress bar 6's header to "Bar 6"
   set progress bar 7's header to "Bar 7"
   set progress bar 8's header to "Bar 8" -- displayed twice
   set show window to true
   quit
end tell

I thought I would just have to do 'delete progress bar 2' and 'delete bar 8' to fall back on my feet, but it's still not working properly: display is fine but tests proved we still need to address progress bars with their original index, so at the end the last bar is unusable.

I'd be grateful for any help or fix.

Offline

 

#68 2022-09-27 01:42:37 pm

StefanK
Member
From:: St. Gallen, Switzerland
Registered: 2006-10-21
Posts: 11777
Website

Re: SKProgressBar 1.0, a fully scriptable progress bar

Thank you for your report. I will try to fix it.

Edit: I think I got it, stupid mistakes.

SKProgressBar 2.0

Minimum OS version is now 10.13, the app is code-signed and notarized.

Last edited by StefanK (2022-09-27 02:56:20 pm)


regards

Stefan

Offline

 

#69 2022-09-28 04:00:12 am

roustoubi
Member
Registered: 2021-04-14
Posts: 5

Re: SKProgressBar 1.0, a fully scriptable progress bar

Thanks a lot Stefan for the bugfix, now is working fine

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)