AUTOMATOR nouveau fichier

Written by

on run {input, parameters}
    tell application "Finder"
        set currentFolder to container of item 1 of input as alias
        set newFileName to text returned of (display dialog "Nom du nouveau fichier :" default answer "" buttons {"Annuler", "Créer"} default button 2)
        if length of newFileName > 0 then
            set newFile to make new file at currentFolder with properties {name:newFileName}
        end if
    end tell
    return input
end run