я сделал делал это AppleScript для запуска приложений с пометкой:Переменная не определена - Applescript
tell application "Notes"
if exists note starts with applaunch then
set LCommands to {"Launch", "Open"}
repeat with y from 1 to count LCommands
set applaunch to (item y of LCommands)
set AppleScript's text item delimiters to applaunch
set myApp to text items 2 thru 1 of note
set AppleScript's text item delimiters to {""}
set myApp to myApp as text
if y = 1 or y = 2 then
tell application myApp to launch
end if
end repeat
delete note starts with applaunch
end tell
и возвращает ошибку «переменная applaunch не определена», но я определил его. что делать?