Get a handler from a script

David Burgun dburgun at dsl.pipex.com
Fri Mar 17 07:06:55 EST 2006


Hi,

Of course none of the solutions so far work if the function is  
commented out. To make the code 100% foolproof is a lot of work. I  
was doing something similar and found that comments made life really  
difficult.

All the Best
Dave

On 17 Mar 2006, at 11:42, Robert Brenstein wrote:

>> Perhaps using
>>
>> set the wholematches to true
>> put lineOffset("on" && pHandlerName, pScript) into tStart
>> if tStart is 0 then put lineOffset("function" && pHandlerName,  
>> pScript) into
>> tStart
>> put (lineOffset("end" && pHandlerName, pScript) +1 into tEnd
>>
>>
>> answer tStart & cr & tEnd
>>
>> Jim Ault
>> Las Vegas
>>
>
> Unfortunately, wholematches can't be used, at least for the first  
> lineoffset, because there are likely some parameters further in  
> that line. The alternative to lineOffset is to use regex.
>
> A truly generic function would need to know whether it searches for  
> command or function, because it is possible to have one of each  
> with the same name.
>
> Robert
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list