MAC OS X - tahoe 26 - Automator - как создать файл

Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2026
Перейти к:навигация, поиск

MAC OS X - tahoe 26 - Automator - как создать файл

Automator --> Быстрое действие --> Запустить apple script --> Перетянуть в Процессы:

Вставить код:

tell application "Finder"
       set selection_list to selection as list
       if (count of selection_list) > 0 then
           set current_path to (item 1 of selection_list) as alias
           if (kind of (info for current_path)) is not "folder" then
               set current_path to (container of current_path) as alias
           end if
       else
           set current_path to (insertion location) as alias
       end if
       set new_file to make new file at current_path with properties {name:"untitled.txt"}
       select new_file
   end tell

Далее
Сохраните (Cmd + S) под названием «Create new file».


Где хранятся сервисные папки:

Fineder --> Command+SHIFT+G --> ~/Library/Services


# pwd
/Users/antonmac/Library/Services
# ls
New Text File.workflow					Создать текстовый файл.workflow
NewFile.workflow					Создать файл.workflow


Можно удалить их по ssh.


New file automator mac os x 1.png

×
Реклама
ИКС