Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- new version at http://pastebin.com/FjTKv05t
- -- original at https://midnighttokerkate.deviantart.com/art/circle-volume-update-257250247
- property previousVolume : -1
- property previouslyMuted : false
- on run
- set pathName to "/PATHTOSCRIPT/Circle_VolumeIndicator"
- set rawVolume to output volume of (get volume settings) as integer
- if previousVolume is not equal to rawVolume then
- set previousVolume to rawVolume
- set finalVolume to rawVolume * 16 / 100 + 1 as integer
- do shell script ("cp " & pathName & "/Images_White/" & finalVolume & ".png " & pathName & "/temp.png")
- end if
- set outputMuted to output muted of (get volume settings) as boolean
- if outputMuted then
- if previouslyMuted is not equal to outputMuted then
- set previouslyMuted to outputMuted as boolean
- set finalVolume to 1 as integer
- do shell script ("cp " & pathName & "/Images_White/" & finalVolume & ".png " & pathName & "/temp.png")
- end if
- else
- if previouslyMuted is not equal to outputMuted then
- set previouslyMuted to outputMuted as boolean
- set finalVolume to rawVolume * 16 / 100 + 1 as integer
- do shell script ("cp " & pathName & "/Images_White/" & finalVolume & ".png " & pathName & "/temp.png")
- end if
- end if
- end run
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement