Re: Display the state of a process
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