Automater or Apple script to Auto-delete web/chat history?

Discussion in 'Mac Programming' started by Jasoneskin, Nov 27, 2016.

  1. Jasoneskin macrumors newbie

    Joined:
    Dec 27, 2007
    #1
    Hello! Im trying to figure out how to write a very simple apple script or automater task that when run, will automatically clean my Web history, iMessage history, and delete chat transcripts from my other chat app Adium. I know this can't be difficult. It's essentially a script that will permanently (skipping trash can) delete several log files.

    Additionally, looking for it to be accessible when double clicked AND, if I choose, each time I start my computer. Anyone know an easy script that exists for this?

    Thanks!
     
  2. vmachiel macrumors 68000

    Joined:
    Feb 15, 2011
    Location:
    Holland
    #2
    I don't know anything about apple script or automator. Look into a simple python script that deletes all the files that store those things.
     
  3. kepgnar macrumors newbie

    kepgnar

    Joined:
    Dec 30, 2015
    #3
    you should be able to do that with a standard shell script...

    I'm not much of a scripter, but:

    #!/bin/bash

    sudo rm -rf /path/to/iMessage history
    sudo rm -rf /path/to/safari history
    etc.

    save as "nohistory.sh" or whatever your preference is.

    then do "chmod a+x nohistory.sh" from terminal to make it executable.

    you can run from terminal using "./nohistory.sh" OR you can do "get info" and set it to open with Terminal.

    from there you could add to login items maybe, or turn it into an Automator application. Also, as far as trying to add a password to the script to make it completely unattended, that's a different debate.

    I'm a noob at this, and it's off the top of my head, so there's prob a more elegant solution, but that's what I would do.
     

Share This Page