Thanks Alex, this works really well from what I have tested so far.

On a related note, it seems that when I use script xtras, they will only open 
up once, i.e. If I have 2 instances of director open, the script xtras will not 
open in the second instance of director it gives an "open with write permission 
by another user".

It does this regardless of whether it's a .dir or .dcr file

Any ideas?

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alex da Franca
Sent: 22 September 2005 14:19
To: Lingo programming discussion list
Subject: Re: <lingo-l> Tools for DMX 04 Authoring Environments


Am 22.09.2005 um 14:22 schrieb Tim Welford:

> That's a great start Kraig, thanks
>
> Now I have just got to find some lingo to replicate the use of the "go
> to handler" button in the script window.

the UIHelper xtra is your friend here.


activateScriptEditor memberNum, castlibNum, fromChar, toChar


on goToHandler handlername, scriptmember
   if ilk(scriptmember) <> #member then scriptmember = getScriptMember 
(handlername)
   if ilk(scriptmember) <> #member then return 0
   handlername = "on" && handlername
   offs = offset(Return & handlername, scriptMember.scripttext)
   if offs > 0 then
     activateScriptEditor scriptMember.membernum,  
scriptMember.castlibNum, offs, (offs + length(handlername))
   end if
end

on getScriptMember handlername
   handlername = symbol(handlername)
   repeat with m = the number of castlibs down to 1
     repeat with n = the number of members of castlib m down to 1
       if member(n,m).type = #script then
         if (script(member(n,m)).handlers()).getPos(handlername) > 0  
then return member(n,m)
       end if
     end repeat
   end repeat
   return 0
end




---------------------------

   |||
a¿ex


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to