Monday, June 17, 2019

#1 2019-02-17 09:07:35 am

sebrady
Member
Registered: 2005-09-13
Posts: 25

progress bar

this works. When the untitled folder appears, the progress bar disappears. What I would like is for the progress bar to go to 100%, then disappear. Cant figure out how to make that happen, I get an error that Finder needs permission.

It like the progress bar does not want to be inside the Tell Finder loop.

Any help would be appreciated.



Applescript:


set total_seconds to 100
set the_folder to (path to desktop as string) & "untitled folder" as string

set progress total steps to total_seconds
set progress description to "Script Progress"
set progress additional description to "Additional description"

repeat with i from 1 to total_seconds
   
   set progress completed steps to i
   delay 0.1
   
   tell application "Finder"
       if (exists folder the_folder) then
           delay 1
           exit repeat
       end if
   end tell
   
end repeat




Last edited by sebrady (2019-02-17 09:19:41 am)

Offline

 

#2 2019-02-17 09:22:56 am

sebrady
Member
Registered: 2005-09-13
Posts: 25

Re: progress bar

figured it out. I made an app with XOJO that has in interface with buttons on it. Some buttons will mount a server at work and type your ID and PW for you. The code below should give the use a visual on the progress of the server being mounted. Hope this helps someone in a similar fashion.


Applescript:


set total_seconds to 100
set the_folder to (path to desktop as string) & "untitled folder" as string

set progress total steps to total_seconds
set progress description to "Script Progress"
set progress additional description to "Additional description"

repeat with i from 1 to total_seconds
   
   tell application "Finder"
       if (exists folder the_folder) then
           set i to 100
           delay 1
           --exit repeat
       end if
   end tell
   
   set progress completed steps to i
   
   if i is equal to 100 then
       delay 1
       exit repeat
   end if
   
   delay 0.1
   
end repeat




Last edited by sebrady (2019-02-17 09:41:04 am)

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)