I’m absolutely stumped. I’m calling the following script from another app:
on run (removeItem)
tell application "System Events"
delete login item removeItem
end tell
end run
This script fails to do anything at all, including throw an error, when calling it the way I’m trying to. I’m passing in a value for removeItem that I know exists, but it stubbornly refuses to go anywhere. If I change the script to this:
set removeItem to "Genieo"
tell application "System Events"
delete login item removeItem
end tell
…and run the script from the other app, it works fine. The login item goes bye-bye.
I would think that there’s a problem with the string being sent from the other app, but I have used a “display dialog” call to display the string, and it’s fine. Further, I’ve got a number of other scripts that receive strings from this app, and in all other cases those scripts work fine. It’s just this one script that is misbehaving.
Any ideas?