Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

MacOSX 10.9.2 broke this Applescript progress bar :(

Hello,


Ever since I upgraded to MacOS 10.9.2, this download script with progress bar, which I frequently use, stopped working. Well the download bit works,

but the progress bar, do not show the progress anymore.


I have tried to resolve the issue, but I cannot get my head around what is wrong. So I hope someone out there can give me a helping hand, in solving

the problem.


The script is supposed to read the lines in the curl command output file, and show the current status in a dialog box, and then finish when it reaches

100%. But for some reason the dialog box, which is supposed to repeately show a dialog with the current progress, now do not appear before the

download reaches 100%. Hence no way to know the current progress of the download.


So is there anyone who knows why this script stopped working with MacOS 10.9.2, and even more importantly, anyone who knows how to fix it?


Thanks..


do shell script "curl -L -o ~/Desktop/file.dmg 'https://download.mozilla.org/?product=firefox-27.0.1-SSL&os=osx&lang=en-GB' > ~/Desktop/status 2>&1 &" with administrator privileges

set fileSize to 0

set curTransferred to 0

set curProgress to 0

repeat until curProgress = "100"

try

set lastLine to paragraph -1 of (do shell script "cat ~/Desktop/status")

set curProgress to word 1 of lastLine

set fileSize to word 2 of lastLine

set curTransferred to word 4 of lastLine

tell me

display dialog "Downloading. Please wait...


Status: " & curTransferred & " of " & fileSize & " (" & curProgress & "%)" buttons {"please wait", "cancel"} giving up after 4

if the button returned of the result is "cancel" then return

end tell

end try

end repeat

iMac, OS X Mavericks (10.9.1)

Posted on Mar 8, 2014 4:06 AM

Reply
Question marked as Best reply

Posted on Mar 8, 2014 6:49 AM

There is no need for administrator privileges, but it seems to work OK for me - are you getting any indications of a problem from the editor log?

2 replies

Mar 8, 2014 7:12 AM in response to red_menace

So you can see a recurring dialog box that shows the current progress of the download? and you are using Maverick 10.9.2 ?


I have tried on three different Macs with 10.9.2, on different networks, and all with the same problem. The dialog box will not show before the download reaches 100%.


If you mean the "event log" in the applscript app. Then no, there is no indication of any error. Which also bugs me, or els a solution could possible be easier to locate.

----------------------------------------------------------------------

OMG. while writing this, I just noticed you comment about no need for administrator privileges.. I remove that bit from the script, and guess what, now it WORKS 😀 Thx a million... 😁

MacOSX 10.9.2 broke this Applescript progress bar :(

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.