Valid function

I got a question, if I create a function in one of my scripts, and then later on want to check if this function still is in my file? how do I do this, I can’t find any infomation about this, lets say i made this

on sendHello()
return “Hello”
end

And then want to check if " sendHello() " is a “valid” function :frowning:

can somebody give me an example on this?

/mkh

Hi mkh,

Why not test this with a simple try-block?


try
	my sendHello()
	return true
on error
	return false
end try

ofc, sometimes the problems have so simple a solution we can’t see it :slight_smile:

thanks for opening my eyes.

/mkh

There are functions in C or other languages, in AppleScript they are called handlers :wink:

hehe Stefan, you are so right, but im using PHP and alot of “functions” on a dayli basic, sometimes I mess up the names, but yeah, it’s called handlers :slight_smile: