Continuing the discussion from Hide Application Enhanced Progress bar:
Just downloaded SKProgressBar Ver 1.8 and I get an error with its demo script, running Script Debugger 7.0.11 (7A106) on macOS 10.14.6 (Mojave):
SKProgressBar 1.8 Error
SKProgressBar got an error: Can’t set «class hDsZ» of main bar to «constant hfSZrgSZ».
«class hDsZ» of main bar
on this line:
set «class hDsZ» to «constant hfSZrgSZ» --> default is small
Any ideas on how to fix it?
Is there a better progress bar that will show a popup window when running a script from SD or FastScripts?
For reference, here’s the entire script:
(note the script says ver “1.6”, but it IS the demo file from Ver 1.8 download.)
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