Yes I know but since Quicksilver is modeless it will display the
dialog attached to SystemEvents and this will put it behind most
windows. At least it does so on my system. I could call out 'property
parent : app "Finder"'  but this has almost no reliabilty with QS :/ )

Also note that the "tell app Finder" can make QS assume that this
script takes files as input because QS scans scripts for this phrase.
(it's in the source code but it certainly doesn't seem to work as
advertised).

On 6 Okt., 15:46, Chris Cairns <[email protected]> wrote:
> To
>
> André Berg,
>
> FYI, there is no need to use Finder.
> You can replace "tell finder, activate" with "tell me to activate"  so
> that the dialog box remains in front.
> The dialog box belongs to StandardAdditions dictionary and not the
> Finder dictionary.
>
>
>
>
>
> > 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