Folder Actions for OS X explained – with real-world examples Zložka Akcia pre OS X je vysvetlené - s real-príkladov

by Ross McKillop on January 30, 2007 Ross McKillop dňa 30. januára 2007

Mac

What are Folder Actions? Aké sú zložky akcie?

In a nutshell, Folder Actions are scripts that can be attached to folders. V skratke, zložky Akcie sú skripty, ktoré môžu byť pripojené do zložiek. They enable events (actions) to take place when items are added or removed from that folder. Umožňujú akcie (akcie) sa uskutoční pri pridanie alebo odstránenie položky z tejto zložky. Events can also occur when the folder is opened, closed or moved. Udalosti môže dôjsť aj pri otvorení priečinka, ktorá bola uzavretá alebo presunutá.

Real-World Examples Real-World Príklady

  • When you put images in a certain folder, they're automatically converted to JPG Keď dáte obrázky v určitej zložke, to sú automaticky prevedené do JPG
  • When you put files in a certain folder, they're automatically uploaded to a web server Keď dáš súbory v určitej zložke, to sa automaticky nahrať na webový server
  • When you close a Finder window, all the sub-folder windows close as well Keď zatvoríte okno Finder, všetky pod-zložky okná blízko, rovnako
  • When new files are placed in a certain folder, you're notified Keď sú nové súbory umiestnené v určitej zložke, oznámi vám to
  • When new files are placed in a certain folder (like your Desktop or download folder) they're moved based on file type Keď sú nové súbory umiestnené v určitej zložke (ako na Ploche alebo stiahnuť zložku), sú presunuté na základe typu súboru
  • See more in the Pozri viac v Folder Action Resources Akcia zložky Zdroje section Oddiel
  • How to enable and use Folder Actions Ako povoliť a používať zložky Akcie

    1. For this example we'll create a Folder Action that converts images to JPG format just by dropping them into a folder (this particular Folder Action is included with OS X). Pre tento príklad budeme vytvárať priečinky akciu, ktorá prenáša obrázky do formátu JPG len tým, že upustia je do priečinka (tento konkrétny zložky Akcia je súčasťou OS X). Start by creating a new folder. Začnite tým, že vytvorí novú zložku.
    2. Now right-click (ctrl-click) on that new folder and select Enable Folder Actions Teraz-pravým tlačidlom myši (ctrl-click) na tejto novej zložky a vyberte Povoliť zložky Akcie


    3. click to enlarge kliknite pre zväčšenie

    4. Again, right-click (ctrl-click) that same folder and this time select Attach a Folder Action… Opäť, dobrý-cvaknúť (ctrl-click) rovnaké priečinku a tentoraz vyberte Pripoj zložky akcie ...


    5. click to enlarge kliknite pre zväčšenie

    6. You'll probably be presented with a list of scripts. Budete pravdepodobne ponúknutý zoznam skriptov. If you're not, you'll need to navigate to the folder that contains all of the Folder Action scripts. Ak nie ste, budete musieť prejsť do priečinka, ktorý obsahuje všetky zložky skriptov akcie. They're in Mac HD/Library/Scripts/Folder Action Scripts/. Sú v Mac HD / Library / Scripts / zložky Akcie Scripts /. Select Image – Duplicate as JPEG and then click Choose Zvoľte Obrázok - Duplicitné ako JPEG a potom kliknite na tlačidlo Zvoliť


    7. click to enlarge kliknite pre zväčšenie

    8. That's it. To je ono. Now drag a non-jpg picture into that folder (a PNG, GIF etc). Teraz pretiahnite non-jpg obrázok do tejto zložky (PNG, GIF, atd).
    9. Ta-da! Ta-da! The Folder Action will have duplicated your image, but this time as a JPG. Zložka akcia bude mať zdvojený vaše image, ale tentokrát ako JPG. It will also save the original image. Bude tiež uložiť pôvodný obrázok.


    10. click to enlarge kliknite pre zväčšenie

    11. If you ever want to change or disable a Folder Action, right-click (ctrl-click) the folder and choose Configure Folder Actions… Ak ste chceli zmeniť alebo zakázať zložky Akcie, dobrý-cvaknúť (ctrl-click) na zložku a vyberte položku Konfigurovať zložky akcie ...
    12. From here you'll be able to manage all of your Folder Actions in one place. Odtiaľ budete môcť riadiť všetky svoje zložky Akcia na jednom mieste.

    Folder Action Resources Akcia zložky Zdroje

    Here are some sites that provide pretty cool Folder Action scripts etc – Tu sú niektoré stránky, ktoré poskytujú docela v pohodě zložky Akcia skriptov atď --

  • Auto-sort files dropped into the System Folder (like OS 9) Auto-sort súbory spadol do systémovej zložky (podobne ako OS 9)
  • Automatically add/import files to iTunes when they're placed in a folder Automaticky pridať / import súborov do iTunes, keď sú umiestnené v zložke
  • Upload files using Cyberduck when they're placed in a folder Upload súborov pomocou Cyberduck keď sú umiestnené v zložke (Upload Sample.scpt) – read the readme.txt for more info (Upload Sample.scpt) - prečítajte si readme.txt pre viac informácií
  • Use Folder Actions and Automator to keep your Desktop super-clean Použite zložky Akcie a automatu, aby sa vaša Desktop super-clean
  • Automatically import (and tag) Photo Booth photos into iPhoto Automaticky import (a značka), Photo Booth fotky do iPhoto
  • Writing Folder Action scripts Akcia zložky písanie skriptov
  • Related Posts: Súvisiace zmeny:
  • Review: World Golf Tour Recenzia: World Golf Tour
  • Review: Apogee Search
  • How to integrate NirCmd with Launchy to enhance productivity Ako integrovať NirCmd s Launchy pre zvýšenie produktivity
  • How to create custom keyboard shortcuts in Ubuntu Ako vytvoriť vlastné klávesové skratky na Ubuntu
  • How to send email from the Linux command line Ako poslať e-mail z príkazového riadku Linux
  • Get Simple Help tutorials just like this one in your email inbox every day - for free! Get Help jednoduchá cvičenie, rovnako ako to vo vašej e-mailovej schránky každý deň - zadarmo! Just enter your email address below: Stačí zadať e-mailovú adresu:

    You can always opt out of this email subscription at any time. Vždy sa môžete odhlásiť z tohto e-mailu predplatného kedykoľvek.

    { 8 trackbacks } Spätné (8)

    Jay's Headspace - » Eager Beaver for 01/31/2007 Jaye Headspace - »Horlivec pre 01/31/2007
    02.04.07 at 9:22 pm 02.04.07 v 922: pm
    Folder Action for automated upload of Aperture web galleries at The Joy of Scripting Zložka Akcia pre automatické odosielanie webové galérie Clona na Joy of Scripting
    11.30.07 at 11:59 pm 11.30.07 v 1159: pm
    Final Cut Producer | Mac Folder Actions Explained Final Cut Výrobca | Mac zložky Akcia Vysvetlenie
    03.04.08 at 6:19 am 03.04.08 v 619: am
    Looky: An AppleScript Folder Action utilizing Quick Look at The Joy of Scripting Looky: AppleScript zložiek akcie s využitím Quick Look at The Joy of Scripting
    03.28.08 at 12:59 am 03.28.08 v 1259: am
    AppleScript ::: Ignorantenprogramm released | macfidelity AppleScript::: Ignorantenprogramm uvoľnených | macfidelity
    03.30.08 at 5:03 am 03.30.08 v 5:03 am
    Folder Actions for OS X explained (with real-world examples) | The Pengas Blog Zložka Akcia pre OS X je vysvetlené (s real-príkladov) | Pengas Blog
    08.11.08 at 4:29 am 08.11.08 v 4:29 am
    New Item Alert « MilkHub Nový bod Upozorniť «MilkHub
    02.18.09 at 3:18 pm 02.18.09 v 3:18 pm
    Automator to Convert Torrents with iSquint? Automat pre prevod Bystřina s iSquint? - MacNN Forums - MacNN Fórum
    04.24.09 at 10:58 am 04.24.09 v 10:58

    { 19 comments… read them below or (19 komentáre ... prečítať nižšie alebo add one pridať jedno } )

    1 1 JP 01.31.07 at 3:52 pm JP 01.31.07 v 3:52 pm

    cool chladný

    2 2 Filip Lam Filip Lam 01.31.07 at 7:34 pm 01.31.07 v 7:34 pm

    Wonderful tip! Wonderful tip! I've been wondering what folder actions was about but never really had the time to figure it out. Bol som premýšľal, čo zložka akcia bola asi nikdy, ale naozaj mal čas na to prišiel. Thanks again! Thanks again!

    3 3 UT 01.31.07 at 11:29 pm 01.31.07 UT v 1129: pm

    I wish all tutorials were this clear! Želám všetkým cvičenie bolo to jasné! Excellent tip!!! Výborný tip!

    4 4 Nick Nick 01.31.07 at 11:42 pm 01.31.07 v 1142: pm

    JP, Filip and UT – JP, Filip a UT --

    Glad to hear it helped!! To rád slyším to pomohlo!

    5 5 Hani 02.16.07 at 7:35 am Hani 02.16.07 v 7:35 am

    Thanks for the great tip. Vďaka za skvelý tip. Is there a way for the music or movie folders to search the computer and add music/videos automatically? Existuje spôsob, ako hudbu alebo film zložky pre hľadanie počítač a pridať hudbu / video automaticky?

    6 6 Andy Andy 10.06.07 at 5:38 pm 10.06.07 v 538: pm

    Great tutorial, this will help me out big time with workflow on my mac. Skvělý tutorial, pomôže mi veľký čas s workflow na môj mac.

    7 7 Murphy Murphy 11.13.07 at 9:24 pm 11.13.07 at 9:24 pm

    Good info, thanks. Dobré info, vďaka.

    Here's how to make a folder that mails files added to it to a preset address, useful for backing them up to Gmail. Tu je návod, ako urobiť, aby maily, súbory, priečinky, ktoré k nej, aby vopred adresu, užitočné pre zálohovanie na Gmail.

    http://murphymac.com/files-mailed-magically-when-dropped-in-a-finder-folder/ http://murphymac.com/files-mailed-magically-when-dropped-in-a-finder-folder/

    8 8 damn.hustle 12.10.07 at 2:36 pm damn.hustle 12.10.07 v 236: pm

    thank you very much. mockrát děkuji. You gave an easy explanation. Dal si jednoduché vysvetlenie.

    9 9 Muthu Muthu 06.18.08 at 6:05 am 06.18.08 v 6:05 am

    Awesome. Desivý. Simple example which i was waiting to go though in years. Jednoduchý príklad, ktorý som čakal, ísť aj keď v rokoch.

    10 10 Emilio Marte 06.25.08 at 12:37 pm Emilio Marte 06.25.08 v 12:37

    Saludos: Saludos:

    Por favor me gustaría que alguien me diga, cómo puedo hacer para que cuando alguien coloque un archivo en un folder cualquiera, que este me notifique o que se active si el mismo está abierto. Por favor me gustaría que alguien me Diga, cómo puedo hacer para que cuando alguien coloque un en un archivo zložky cualquiera, que este mi notifique o que sa aktívne si el mismo está abierto.

    Gracias de antemano Gracias de antemano

    11 11 Emilio Marte 06.25.08 at 12:40 pm Emilio Marte 06.25.08 v 12:40

    Please I would like to see someone tell me, how can I do so that when someone put a file in a folder anyone, I notice that this or that is activated if it is open. Prosím, já bych si prial, aby mi niekto povedať, ako to mám urobiť, takže keď niekto dať súbor v zložke niekto, som si všimla, že ten či onen sa aktivuje, ak je otvorený.

    Thanks in advanc Thanks in advance

    12 12 frank frank 07.04.08 at 11:49 pm 07.04.08 v 1149: pm

    Ok i give you thumbs up! Ok ja vám thumbs up!

    13 13 slub slub 08.26.08 at 9:51 pm 08.26.08 v 951: pm

    Simple, easy and to the point. Jednoduchý, prehľadný a k veci. thank you thank you! děkuji děkuji! I couldn't find that information anywhere on apple's site. Nemohol som nájsť informácie, že nikde na stránkach Apple.

    14 14 JoDitt JoDitt 02.21.09 at 8:32 pm 02.21.09 v 8:32 pm

    Thanks for your simple explanation of folder actions, and especially for the real world examples. Vďaka za vaše jednoduché vysvetlenie zložky akcií, a to najmä na skutočný svet príklady.

    15 15 Jason Beebe Jason Beebe 03.07.09 at 11:09 pm 03.07.09 o 11:09 hod

    Great tip. Celok cíp. I will definitely give this a go on my iMac. Ja sa určite budú dávať to na svoj iMac.

    16 16 Mariano 04.02.09 at 7:08 pm Mariano 04.02.09 v 7:08 pm

    Thanks for this tutorial. Thanks for this tutorial.

    17 17 Juergen 05.17.09 at 12:17 pm Juergen 05.17.09 v 12:17

    I would like to know what events may trigger a folder action. Chcel by som vedieť, aké udalosti môžu vyvolať zložky akcie. Unfortunately, I cannot find a reference manual, but it seems like that adding a file is the one and only event which can start a automator script. Bohužiaľ, nemôžem nájsť referenčnú príručku, ale zdá sa, ako že pridaním súbor je jediný jav, ktorý možno spustiť skript automatu.
    My goal is to implement an action that fires if a folder is opened or closed from a remote host. Mojím cieľom je zaviesť opatrenia, ktoré prepustí, ak je zložka otvorené alebo zatvorené, zo vzdialeného hostiteľa. In this case, iTunesFS should launch. V tomto prípade by mala začať iTunesFS. If the connection is closed, the iTunesFS should get closed as well. Keď je spojenie je zatvorené, iTunesFS by mal dostať aj zatvorené. Any suggestons? Akýkoľvek suggestons?

    18 18 Fero 06.21.09 at 5:25 am Fero 06.21.09 v 525: am

    Great script, especially the notify when new file placed in folder. Dokonalý scenár, najmä oznámiť, kedy nový súbor umiestnený v priečinku.

    Can someone suggest a workaround for Leopard which doesn't allow you to send a fax, unless you disable 'Receive faxes on this computer'. Niekto môže navrhnúť riešenie pre Leopard, ktorý neumožňuje odoslať fax, ak zakážete 'Príjem faxov v počítači'. I suppose the steps for sending a fax would require the steps; Myslím, že kroky pre odoslanie faxu by vyžadovalo kroky;
    - select file to be faxed - Vyberte súbor k faxu
    - when 'Fax Pdf' is selected, script should 'deactivate receive fax on this computer' and save settings and close - Pri 'Fax PDF' je vybraná, skript by mal 'deaktivovať príjem faxov na tomto počítači' a uložte nastavenie a zatvorte
    - fax should then send (hopefully) - By potom mal poslať fax (dúfajme)
    - once fax has sent, then script should reinstate 'receive fax on this computer' setting. - Raz faxom poslal, potom sa skript by mal opäť 'príjem faxov na tomto počítači' nastavenia.

    THanks all Thanks all
    FJK FJK

    19 19 Multimedia Design Multimedia Design 08.31.09 at 9:28 pm 08.31.09 v 9:28 pm

    I think you just invented the 30 hour day. Myslím si, že práve vymyslel 30 hodín denne. This is going to give me so much free time – thanks! Tohle mi toľko voľného času - vďaka!

    Leave a Comment Zanechať komentár

    You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Môžete použiť tieto HTML tagy a atribúty: href = "" <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> del datetime <em> <i> <q Cite=""> <strike> <strong>