No matching processes belonging to you were found

I am working on a script that opens another script that gets stuck in the middle of a task. Then I use the first script to force quit the stuck script. It seems to be a quick easy fix for something I think is probably a bug in the OS.

on run
try
display dialog "Some dialog" buttons {"Cancel", "ChoiceA", "ChoiceB"}
if the button returned of the result is "ChoiceA" then
tell application "some application"
quit
end tell
else if the button returned of the result is "ChoiceB" then
try
activate application "Another Application"
end try
delay 3
do shell script "killall -c Another Application"

end if
on error -128
quit
try
tell application "some application"
quit
end tell
end try
end try
end run

However, when the script reaches the killall line, I get an error *"No matching processes belonging to you were found."* So, how can I fix that?

PowerBook G4 1.67 Ghz, Mac OS X (10.4.10)

Posted on Nov 12, 2007 3:48 PM

Reply
4 replies

Nov 14, 2007 5:30 AM in response to Joey Delli Gatti

Hello

I think you're using 'do shell script' in a wrong way.
Try something like this instead.

-- SCRIPT
display dialog "Set desktop background to:" buttons {"Cancel", "Normal", "ScreenSaver"} with icon 1
if button returned of result = "ScreenSaver" then
do shell script "/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.a pp/Contents/MacOS/ScreenSaverEngine -background > /dev/null 2>&1 &"
else
--do shell script "killall ScreenSaverEngine"
tell application "ScreenSaverEngine" to quit
end if
-- END OF SCRIPT

cf.
http://developer.apple.com/technotes/tn2002/tn2065.html#TNTAG5
Q: I want to start a background server process; how do I make do shell script not wait until the command completes?

Good luck,
H

Nov 13, 2007 6:47 PM in response to red_menace

OK, ok, I'll let out the secret of my top-secret script.

Here it is in its entirety:

on run
try
display dialog "To use your current screensaver as your desktop \"background image\", then click ScreenSaver." buttons {"Cancel", "Image", "ScreenSaver"}
if the button returned of the result is "Image" then
tell application "ScreenSaverEngine"
quit
end tell
else if the button returned of the result is "ScreenSaver" then
do shell script "/System/Library/Frameworks/ScreenSaver.framework/Resources" & "\\" & "/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background"
end if
on error -128
quit
try
tell application "ScreenSaverEngine"
quit
end tell
end try
end try
end run

When you type the terminal script in Terminal, you click in the terminal window and push CTRL C to stop it. In this script, the script pauses at the shell script until COMMAND . is typed. Then it gives that error message. So, I tried using the script to ignore app responses, but then the script doesn't do the shell script. So I tried creating another script and bundling it in an AppleScript App bundle.

I had the following in the bundled script app:

delay 20

and that's it. Then I tell my first script to activate the bundled script app. Then I say:

tell app "BundledApp"
ignoring application responses
do shell script "the shell script"
end ignoring
end tell
do shell script killall -c BundledApp.app

At first, this worked... I think. After the app closed, the screensaver continued. Then all I had to do is run the main script again to quit it. I must have done something though because now I get the error that says that "no matching processes belonging to you were found" when I try to quit the bundled app. It activates it... but won't quit it.

The problem seemed to happen right after I set the visibility status for the bundled app to not be displayed in the dock. However, I have replaced that script several times and have rebooted - the problem still haunts me.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

No matching processes belonging to you were found

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.