Skip to content

Instantly share code, notes, and snippets.

@docrock
Forked from anonymous/Siri Listener
Created March 29, 2013 20:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save docrock/5273497 to your computer and use it in GitHub Desktop.
Save docrock/5273497 to your computer and use it in GitHub Desktop.
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
@docrock
Copy link
Author

docrock commented Mar 29, 2013

Just starting a fork to add new ideas and script add ons for Siri Listener.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment