AppleScript HELP

Hi everyone,
I’m new in Applescript and I have a problem with an easy script


tell application "Finder" to get the name of front Finder window

When i get Run I had the followe error:

I don’t understan why…Is only one month the I use Mac,
Please help me…
Thanks a lot

Hi Amrita

this may be what your after

tell application "System Events"
	set _Frontmost to name of the first process whose frontmost is true
	display dialog _Frontmost
end tell

Budgie

Hi,
thanks for you attentio, but I don’t understand your answer!
I think that your script isn’t the solution of my problem, because I don’t understan the AppleScript error window.
Thank you.
Rita

Hi

try this

tell application "Finder" to get the name of the front window

http://www.apple.com/applescript/firsttutorial/17.html

Budgie

Hi,
I tried this command before write you, but doesn’t work :frowning:
And I used the web site the you suggest me…
Maybe is a problem of my mac???
Thanks a lot for your attention.
Rita

Your script seems to be ok!
However, you need at least a finder window (or widows) to be opened in order to work!
Or you should --tell app “finder” to open YourWindowName-- at first! :slight_smile:
I mean, that in order applescript brings you the name of a window, the window should be activated.
That’s all folks!