You need to add an optional attribute with a value of "yes" to the parameter in your sdef. I imagine you can do it in Sdef Editor, otherwise you’ll need to do it manually. Then change the code to something like:
on find theString using thePattern ignore case caseFlag : false
The code side of things is covered in the 10.10 release notes.
I realize my precedent post is a little bit confused.
Let’s take another example with a command to change the extension in a path:
on path change extension thePath newExtension newExt full path fullPath
As it’s changing the path, it’s obvious it must return a path.
But some times, we only need the name.
For that, we could have another command or ask for the last component.
I find that an optional parameter is more adequate.