Last active
May 23, 2018 23:50
-
-
Save PiotrKrzyzek/80b68bc1ea219c9c642b3068e835b422 to your computer and use it in GitHub Desktop.
Upon new file detected, run animation script for ckb_next pipe animation as a system notification for whatever event.
This file contains 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 adding folder items to this_folder after receiving added_items | |
try | |
repeat with nDec from 0 to 255 | |
set nHex to do shell script "perl -e 'printf(\"FFFFFF%x\", " & nDec & ")'" | |
do shell script "echo " & nHex & " > /tmp/ckbpipe001" | |
delay 0.005 | |
end repeat | |
delay 0.1 | |
repeat with nDec from 0 to 255 | |
set nHex to do shell script "perl -e 'printf(\"FFFFFF%x\", " & 255 - nDec & ")'" | |
do shell script "echo " & nHex & " > /tmp/ckbpipe001" | |
delay 0.005 | |
end repeat | |
do shell script "echo FFFFFF00 > /tmp/ckbpipe001" | |
repeat with EachItem in added_items | |
tell application "Finder" | |
delete EachItem | |
end tell | |
end repeat | |
end try | |
end adding folder items to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment