-
-
Save docrock/5273497 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run | |
-- just here to get things started... | |
end run | |
on idle | |
tell application "Notes" | |
if exists note "What apps are running?" then | |
delete note "What apps are running?" | |
tell application "Finder" | |
set myRunningApps to name of every process whose visible is true | |
tell application "Notes" | |
if exists note "Running Apps:" then | |
delete note "Running Apps:" | |
end if | |
set noteTitle to "Running Apps:" | |
set AppleScript's text item delimiters to ", " | |
set appsList to myRunningApps as text | |
make new note at folder "Notes" with properties {name:noteTitle, body:appsList} | |
end tell | |
end tell | |
else if exists note "Shut down" then | |
delete note "Shut down" | |
tell application "Finder" to quit | |
else if exists note "Go to sleep" then | |
delete note "Go to sleep" | |
tell application "Finder" to sleep | |
else if exists note "Restart my mac" then | |
delete note "Restart my mac" | |
tell application "Finder" to restart | |
end if | |
end tell | |
return 1 | |
end idle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just starting a fork to add new ideas and script add ons for Siri Listener.