• 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
Re: do shell script FREEZES Finder!!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: do shell script FREEZES Finder!!


  • Subject: Re: do shell script FREEZES Finder!!
  • From: Graff <email@hidden>
  • Date: Mon, 26 Apr 2004 11:00:30 -0400

You have not fully backgrounded the command, in order to do so you need to divert the stdout and stderr somewhere. So far you have only diverted stderr to the same place as stdout. As I said in an earlier e-mail try changing the command to:

set shell_cmd to "cd " & POSIX_Path & " && /usr/local/bin/rar a -s -v10M -vn " & BaseHostName & " SeanHannity_0423_CommericalFree.mp3 > /dev/null 2>&1&"

You'll note that I added "> /dev/null" near the end. It needs to be before the "2>&1&". This diverts stdout to /dev/null which is a black hole of sorts and which simply throws away anything you divert to it. Since you now have the full divert and background done ("> /dev/null 2>&1&"), you should have completely detached the shell command from AppleScript and should have no further problems.

- Ken

On Apr 26, 2004, at 4:35 AM, Richard Covert wrote:

tell app "Finder"
...
...
...

(* now do the rar command such as
rar a -s -v10M -vn $1 *.mp3
*)
set shell_cmd to "cd " & POSIX_Path & ,
" && /usr/local/bin/rar a -s -v10M -vn " & BaseHostName & ,
" SeanHannity_0423_CommericalFree.mp3 2>&1&"
display dialog "shell_cmd is " & shell_cmd
--do shell script shell_cmd
get shell_cmd
end tell



As you can see, I have tried to put the UNIX command in the background, and yet the Finder still freezes!!!

As I said, the 'rar' takes several minutes to complete, but the Finder freezes ONLY when I execute 'rar' from a do shell script command within an Applescript.

So, it seems to me to be a bug in Applescript. Especially since I also get an Applevent Timeout error from the AppleScript Editor running the applescript itself.
_______________________________________________
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.
_______________________________________________
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.


References: 
 >do shell script FREEZES Finder!! (From: Richard Covert <email@hidden>)

  • Prev by Date: Re: UNIX DATE
  • Next by Date: Permissions when new folder made
  • Previous by thread: Re: do shell script FREEZES Finder!!
  • Next by thread: Unique Identifier for Disk
  • Index(es):
    • Date
    • Thread