6.6 C
London
Wednesday, January 31, 2024

macos – How do I get the “proportion accomplished” to work on Automator apps?


See if this helps, within the “Mac Automation Scripting Information” underneath the part “Interacting with Customers” lists Displaying Progress:

    - Reset the progress data
    set progress whole steps to 0
    set progress accomplished steps to 0
    set progress description to ""
    set progress further description to ""

So, as you progress by means of the script, it seems altering these parameters assist present the progress within the menu bar. I have never accomplished my testing on this. However, that is what I will be doing.

Since I wrote the above reply, I attempted it myself. You probably have entry to working Apple Script, I feel nonetheless it’s legitimate (due to this fact I shall be testing it additional myself).

Nonetheless, discovered a fast win too:

proportion="10%"
counter=2
    
osascript -e "show notification "script accomplished: ${proportion}" with title "Script ${counter} progress""

Right here I’ve used two variables. Be at liberty to regulate to your wants. Variables are non-obligatory. However I believed it would be helpful.

Secret sauce is the osascript command. You’ll be able to go the script command with the -e swap. And get that to run your show notification, which isn’t essentially the most elegant. However with out having to peak on the logs, you may see one thing round within the GUI now, whilst you work on different essential duties.

Once more, to simplify, the bare-bone command would look one thing like:

osascript -e "show notification MyMessage with title MyMessageTitle"

A bit extra full model would seem like:

osascript -e 'show notification "All graphics have been transformed." with title "My Graphic Processing Script" subtitle "Processing is full." sound title "Frog"'

Hope this helps a bit.

Reference:
https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/DisplayNotifications.html

Latest news
Related news

LEAVE A REPLY

Please enter your comment!
Please enter your name here