• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Display the state of a process
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Display the state of a process


  • Subject: Re: Display the state of a process
  • From: Shane Stanley <email@hidden>
  • Date: Sat, 07 Apr 2018 13:10:21 +1000

On 7 Apr 2018, at 12:49 pm, Gil Dawson <email@hidden> wrote:
>
> Another idea?

Assuming you're talking about a script, you can add a badge to its dock icon:

use AppleScript version "2.4"
use framework "Foundation"
use framework "AppKit"
use scripting additions

on showDockBadge(theText)
        set theApp to current application's NSApplication's sharedApplication()
        set theDockTile to theApp's dockTile()
        theDockTile's setBadgeLabel:theText
        theDockTile's display()
        -- theApp's requestUserAttention:(current application's
NSInformationalRequest)
end showDockBadge

repeat with i from 1 to 10
        showDockBadge(i as text)
        delay 1
end repeat
showDockBadge("")

Uncomment the extra line if you also want the dock icon to bounce when the
value changes.

--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Display the state of a process
      • From: Jean-Christophe Helary <email@hidden>
References: 
 >Display the state of a process (From: Gil Dawson <email@hidden>)

  • Prev by Date: Re: Display the state of a process
  • Next by Date: Re: whose class is folder...
  • Previous by thread: Re: Display the state of a process
  • Next by thread: Re: Display the state of a process
  • Index(es):
    • Date
    • Thread