Hi,
I have a handler that works perfectly as a single statement, but not when embedded in an IF statement. Here is the handler:
on ForceQuitTheApp(appName)
try
set thePid to (do shell script "ps ax | grep " & (quoted form of appName) & " | grep -v grep | awk '{print $1}'")
if thePid is not "" then do shell script ("kill -9 " & thePid)
end try
end ForceQuitTheApp
BTW what does the variable «thePid» stand for ? I copied that from another thread without really understanding what it meant …
Regards.
Robert