• 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: Finder freezes during a do shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder freezes during a do shell script


  • Subject: Re: Finder freezes during a do shell script
  • From: Graff <email@hidden>
  • Date: Mon, 26 Apr 2004 00:15:07 -0400

Can you run the command as a background command? If you don't need any feedback from the command then just change the statement to:

set shell_cmd to "cd " & POSIX_Path & "; /usr/local/bin/rarMP3 " & BaseHostName & " SeanHannity_0423_CommericalFree.mp3 >/dev/null 2>&1 &"

This will cause the command to run independently from the AppleScript script and should cure your problems. You can read more about this at:
<http://developer.apple.com/technotes/tn2002/tn2065.html>

- Ken

On Apr 25, 2004, at 9:26 PM, Richard Covert wrote:

This is part of my Applescript . it is surreounded by an earlier tell
app "Finder"

anyway, I have folder with a bunch of files that I want to add RAR
files to. I use the UNIX command 'rar' to build the rar files. If I
issue the command
rar a -s -v10M -vn $1 *.mp3
from a Terminal window, it takes severals minutes to finish. The rar
command produces a line of output with an incrementing percentage
display.

If I build a shell command string as below, I can execute the command.
But, the Finder freezes until the 'rar' command completes. I also get
an AppleEvent timeout alert in my desktop..
Other Mac OS X apps (such as the Script Editor) still respond. But, I
can not switch back to the Finder and I can not do a Force Quit' to
kill the 'rar' app early.

Other do shell script commands execute as expected and do not appear to
freeze the Finder. The rar command, when executed from a bash shell in
a Terminal window does not freeze the Finder. The Finder freezes only
when I do a 'do shell script' from my Applescript file while running
AppleScript.

My environment is a Pismo G3/500 Powerbook, Mac OS X 10.3.4, etc.

Basically, I build a shell command to cd to the directoy containing the
files to be 'RAR'ed, then perform a RAR command on a file in that
directory. Seems simple enouhg in theory but it freezes the Finder in
application.

RATS!!!


set shell_cmd to "cd " & POSIX_Path & ,
";/usr/local/bin/catsegs.sh " & BaseHostName
display dialog "shell_cmd is " & shell_cmd
do shell script shell_cmd
*)
(* now do the rar command such as
rar a -s -v10M -vn $1 *.mp3
*)
set shell_cmd to "cd " & POSIX_Path & ,
"; /usr/local/bin/rarMP3 " & BaseHostName & ,
" SeanHannity_0423_CommericalFree.mp3 2>&1"
display dialog "shell_cmd is " & shell_cmd
do shell script shell_cmd
_______________________________________________
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: 
 >Finder freezes during a do shell script (From: Richard Covert <email@hidden>)

  • Prev by Date: more about the Finder freeze
  • Next by Date: Re: more about the Finder freeze
  • Previous by thread: Finder freezes during a do shell script
  • Next by thread: Re: Finder freezes during a do shell script
  • Index(es):
    • Date
    • Thread