Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > applescript Problem!

applescript Problem!
Thread Tools
mshuk
Fresh-Faced Recruit
Join Date: Mar 2009
Status: Offline
Reply With Quote
Mar 18, 2009, 06:14 PM
 
I am a relatively new switcher & I want to learn applescript. I bought Sal Soghoian and Bill Cheeseman's book Apple Training Series: AppleScript 1-2-3. Script 1.4 tells me to enter tell application "Finder" to get the name of the front Finder window. It compiles ok, but when I run it I get applescript error Finder got an error: Can't get Finder window 1. The book shows the result as "Macintosh HD" I would be very grateful if somebody could tell me why this is so. Many thanks.
     
larkost
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status: Offline
Reply With Quote
Mar 18, 2009, 08:06 PM
 
Could it be that when you ran it there were no open windows in the finder?
     
mshuk  (op)
Fresh-Faced Recruit
Join Date: Mar 2009
Status: Offline
Reply With Quote
Mar 20, 2009, 12:27 PM
 
Excellent. Many thanks larkost. Noobie mindset. Because there was a blue light beneath the Finder icon I thought the finder was running. It was but I as you say I didn't have a Finder window open.

Quest to complete AppleScript enlightenment continues. Once again many thanks.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 02:51 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,