AppleScript: Call handler inside tell statement

I get this error everytime i run this script: System Events got an error: "Test123" doesn’t understand the notify message.

Code:

--more code...
tell application "System Events"
    if some_system_events_property then
         my notify of "Test123" thru "Test"
    end if
end tell
--more code...
to notify of message thru level
    display dialog message with titel level
end notify

I have tried to replace

my notify of "Test123" thru "Test"

with the following, without any success:

notify of "Test123" thru "Test" of me
(notify of "Test123" thru "Test") of me
6
задан Tyilo 5 May 2011 в 19:13
поделиться