so I'm trying to create a service that will be located in the Finder context menu, and which will allow you to create a new document in the current directory.
I do this using Automator:
Sorry, everything is in French ^^
Anyway, here is the AppleScript that I use to retrieve the current working directory:
on run {input, parameters} tell application "Finder" set pwdAlias to insertion location as alias if not (exists folder pwdAlias) then set pwdAlias to (container of pwdAlias) as alias end if end tell set pwd to POSIX path of pwdAlias return pwd end run
Then I set this value to a variable, and then create a new text document using the variable as the path to the document, and finally I use the Reveal in Finder command to show the created document.
Everything works fine, except the script is always late ! I mean, when I open a new Finder window and select my service, it systematically creates a document in the previous window, as shown below: 

But if I try a second time, the document will be created correctly in the expected location: 

And it is very systematic it happens every time!
Sorry if I'm not very clear, it is not so easy to explain!
Ok, otherwise I run Mountain Lion, and here comes the Automator project: create_new_document
To add a service, simply unzip and place the file in the ~ / Library / Services / folder
Hope to get answers, but I'm afraid this is just an Automator mistake!