Applescript Help

Discussion in 'macOS' started by jimjiminyjim, Mar 26, 2005.

  1. jimjiminyjim macrumors 6502

    Joined:
    Feb 24, 2003
    Location:
    Canada
    #1
    I need an applescript for folder actions that sets the "open with" (creator?) to webminimalist (a basic html editor). This way, by default, html files can open in webminimalist when they are in my "sites" folder, while allowing html files elsewhere in the system to open with my browser.

    Can anyone write such a script for me?, edit: or propose a better solution?
    Thanks,
    Jim.
     
  2. grapes911 Moderator emeritus

    grapes911

    Joined:
    Jul 28, 2003
    Location:
    Citizens Bank Park
    #2
    you could try"
    select all the files.
    Control-click them
    open with...other
    Click "always open with"
    find your program
     
  3. jimjiminyjim thread starter macrumors 6502

    Joined:
    Feb 24, 2003
    Location:
    Canada
    #3
    The reason I need a folder specific applescript is because I don't want all html files to open in an html editor.

    An Applescript in folder actions is the only method I can think of so that I do not need to manually change the "open with" for each and every file I create in my sites folder.
     
  4. Mitthrawnuruodo Moderator emeritus

    Mitthrawnuruodo

    Joined:
    Mar 10, 2004
    Location:
    Bergen, Norway
    #4
    You may then open the info window for a .php-file, any .php-file, change the "open with" app to webminimalist, then press the "change all" button and (almost) every .php-file on your system will open in webminimalist when you doubleclick it... repeat for .css and .js, or html or whatever files you want to open in webminimalist...

    ...if you just want to change files in a spesific folder, open that folder an view it as list (cmd-2), and sort them by Kind, then it's easy to mark all files according to type... and you can open the info window for multiple files and change the "open with" attribute for those marked files...

    Edit: Ignore the first part of my answer... gotta start refreshing threads befor replying... ;)
     
  5. jimjiminyjim thread starter macrumors 6502

    Joined:
    Feb 24, 2003
    Location:
    Canada
    #5
    This works, but each time I create a new html file, I have to change it. That's why I'd like an applescript, so that this repetitive task can be left to the computer, and not me, a forgetful person. I suppose that if no one with the applescript skills to whip this script off for me reads this thread, I can just wait until tiger comes out and use automator. That way I won't have to learn the applescript language (yes, I know it's supposed to be easy).

    This is the ailment of being a long-time Mac user - one expects the computer to be able to do anything.

    edit: spelling
     

Share This Page