• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
why the Finder froze!!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

why the Finder froze!!


  • Subject: why the Finder froze!!
  • From: Richard Covert <email@hidden>
  • Date: Fri, 30 Apr 2004 03:07:41 -0500

I had a problem with a small script.
The script was like this:

tell app "Finder"

do some stuff

do some more stuff

now do a 'do shell script'

end tell

The problem was that when I did the 'do shell script' it was WITHIN a Finder app block. As soon as the shell script started, the UNIX command blocked the Finder. So, the Applescript script file itself was blocked while the UNIX commaand was running as well as all of my Finder windows.

The solution is to remove the 'do shell script' command from within the Finder block. I did this by making a subroutine called myDoShellCmd which is placed OUTSIDE of the tell app "Finder" block.

This is a great lesson about the scope of a block. The Finder is not active in a local subroutine called from within a tell app "Finder" block. The subroutine must also have a tell app "Finder" block.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: Terminal background picture
  • Next by Date: Repaying help by posting small Applescripts
  • Previous by thread: Re: Terminal background picture
  • Next by thread: Repaying help by posting small Applescripts
  • Index(es):
    • Date
    • Thread