nice script, it worked good, thanks!

On Oct 4, 11:09 pm, andreb <[email protected]> wrote:
> You could try using one of my AppleScripts. It seems to work with
> folders containing domain names:
>
> ------------------ Script ----------------------
> (*
>     Create New Document in Folder...
>
>     Version: 0.1
>
>     Created by André Berg on 2009-10-05
>     Copyright © 2009 Berg Media. All rights reserved.
>
>     Indirect action script for Quicksilver.
>     Put into "~/Application Support/Quicksilver/Actions".
>     Restart QS and call the script from the second pane
>     when you have a folder in the first pane. The Finder should
>     come into the foreground and ask for a filename in a dialog.
>     A new document with that name is then created.
>
>     License: Apache License 2.0
>     Warranty: "AS-IS", no warranties of any kind either express or
> implied
> *)
>
> using terms from application "Quicksilver"
>         on open f
>
>                 set pp to (POSIX path of first item of f)
>                 set pp to (characters 1 thru -2 of pp) as string
>
>                 tell application "Finder"
>                         activate
>                         --dialog 1: ask filename
>                         set the_result to display dialog ¬
>                                 "Enter file name (incl. ext if needed)" 
> default answer ¬
>                                 "New Document.txt" with icon 1 ¬
>                                 buttons {"Cancel", "OK"} ¬
>                                 default button "OK"
>                         set button_pressed to button returned of the_result
>                         set text_typed to text returned of the_result
>                         if button_pressed is "OK" then
>                                 set filename to text_typed as text
>                         else
>                                 return
>                         end if
>                 end tell
>
>                 tell application "Terminal"
>                         set fullPath to (pp & "/" & text_typed) as text
>                         do shell script "touch " & quoted form of fullPath
>                 end tell
>
>                 tell application "Quicksilver" to open fullPath
>         end open
> end using terms from
> -------------------------------------------------------

Reply via email to