tell application "System Events" if exists process "Nocturne" then try quit application "Nocturne" end try else try open application "Nocturne" end try end if end tell