on run -- ši eilutė tik tam kad viskas vyktų... 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