Get a handler from a script

Mark Smith mark at maseurope.net
Thu Mar 16 21:16:02 EST 2006


Not tested, but something like this should work:

function getHandler hName,tControl
   put the script of control tControl into tScript
   get lineOffset("on " & hName,tScript)
   if it = 0 then return "not found"
   put it into startLine
   get lineOffset("end " & hName,tScript)
   return line startLine to it of tScript
end getHandler

Cheers,

Mark

On 17 Mar 2006, at 01:25, Thomas McGrath III wrote:

> Hello friends,
>
> I know how to get the script from an objects script via script:     
> put the script of card "Foo" into tBar
>
> But, I would like to get just one of the handlers from a script via  
> script:    put handler "FooBar" of the script of card "Foo" into tBar
>
> Anyone know how to do this easily?
>
> Thanks
>
> Tom
>
>
> Thomas J McGrath III
> 3mcgrath at adelphia.net
>
> Lazy River Software™ - http://www.lazyriversoftware.com
>
> Lazy River Metal Art™ - http://www.lazyriversoftware.com/metal.html
>
> Meeting Wear™ - http://www.cafepress.com/meetingwear
>
> Semantic Compaction Systems - http://www.minspeak.com
>
> SCIconics, LLC - http://www.sciconics.com/sciindex.html
>
>
>
>
>
>
>
> _______________________________________________
> 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