[ANN] HOOT: Hacked Object Oriented Transcript

Geoff Canyon gcanyon at inspiredlogic.com
Tue Feb 28 02:51:29 EST 2006


On Feb 27, 2006, at 6:37 PM, Dick Kriesel wrote:

> getProp uRuggedID
>   put the long id of the target into tLongID
>   if word 1 of tLongID is not "stack" then
>     -- note: stacks do not have rugged ids
>     put word 1 to 3 of tLongID into tRuggedID
>     put offset(" of card id ",tLongID) into tOffset
>     if tOffset > 0 then
>       put char tOffset to tOffset + offset(space,tLongID,tOffset +  
> 12) \
>           + 11 of tLongID after tRuggedID
>       -- note: 12 is the length of " of card id "
>     end if
>   end if
>   return tRuggedID
> end uRuggedID
>
> getProp uRuggedLongID
>   put the uRuggedID of the target into tRuggedLongID
>   put offset(" of stack " & quote,the long id of the target) into  
> tOffset
>   put char tOffset to -1 of the long id of the target after  
> tRuggedLongID
>   return tRuggedLongID
> end uRuggedLongID

Wouldn't this work as well:

getProp uRuggedID
   get the long id of the target
   return (word 1 to 4 of it && word -6 to -4 of it)
end uRuggedID

getProp uRuggedLongID
   get the long id of the target
   return (word 1 to 4 of it && word -6 to -1 of it)
end uRuggedLongID

regards,

Geoff



More information about the use-livecode mailing list