[HN Gopher] AppleScript: Control Your Mac with an Email
       ___________________________________________________________________
        
       AppleScript: Control Your Mac with an Email
        
       Author : Bondi_Blue
       Score  : 21 points
       Date   : 2022-10-26 20:46 UTC (2 hours ago)
        
 (HTM) web link (support.apple.com)
 (TXT) w3m dump (support.apple.com)
        
       | CharlesW wrote:
       | Actual title: "Use scripts as rule actions in Mail on Mac"
       | 
       |  _You can attach an AppleScript script to a Mail rule. For
       | example, you could have an incoming message trigger a script that
       | copies information from the message and pastes it into a database
       | that works with Script Editor._
        
       | mikece wrote:
       | Looks cool; what kinds of automation-via-email hacks have been
       | done with this?
        
         | berbec wrote:
         | rm -rf ~/
        
           | [deleted]
        
           | kuwoze wrote:
           | hey, that's a very useful trick indeed! i suggest all try it
        
             | nicce wrote:
             | He was polite and did not spoil the ultimate trick without
             | tilde character.
        
               | nneonneo wrote:
               | The version with the tilde character is worse! At least
               | with the bare slash, some versions of rm will simply
               | refuse to run (they require --no-preserve-root). Plus,
               | even if it works, "rm -rf /" is likely to start at
               | something like /bin and spew a ton of errors unless you
               | use sudo, giving you ample time to abort before it starts
               | wiping the stuff you care about in /home, /usr, etc.
               | 
               | On the other hand, with the tilde, it will just start
               | wiping your personal files right away and will probably
               | not run into any permission errors.
        
               | computomatic wrote:
               | $ git clone git@github.com:dotfiles '$HOME'
               | Cloning into '$HOME'...        *ugh...*                $
               | rm -rf $HOME        *wait...*             $ cd $HOME
               | cd: no such file or directory: /Users/admin
               | *fuuuuuuuu*
        
           | bobuk wrote:
           | just for explanation, "rm -rf" is a shortened for "Read Mail
           | from the (dash) Root Folder", very useful
        
             | quickco wrote:
             | that's not cool. Tricking computer users who may not be
             | familiar with this command and which could cause data loss
             | with real world repercussions (lost company data, lost
             | treasured family photos etc) is not cool or funny.
             | 
             | For those unfamiliar with this command, it may completely
             | remove all files from your system, resulting in a broken
             | and unrecoverable system.
        
               | nneonneo wrote:
               | With the tilde, it'll actually "just" remove all your
               | files, which will probably leave your system perfectly
               | usable without any of your stuff.
        
       ___________________________________________________________________
       (page generated 2022-10-26 23:00 UTC)