Error code -128
I've got the script working to the point where it opens the applications if they are closed, but when I get to the quitting part, it gives me:
error "LCDManager got an error: User canceled." number -128
I am not sure what I can to do to stop the computer from auto cancelling this?
Here is my script code:
set appName to "LCDManager"
set appNameB to "G-Series Key Profiler"
set quitIt to false
set startIt to false
tell application "System Events"
if not (exists process appName) then
set startIt to true
else if (exists process appName) then
set quitIt to true
end if
end tell
if startIt then
tell application appName to activate
end if
if quitIt then
tell application appNameB to quit
tell application appName to quit
end if
Message was edited by: David Aaron
MacBook Pro 15", Mac OS X (10.6.3)