The handler  on appleevent
                        do anything
                        end applevent

works fine BUT it is  NOT  activated  on the targeted Livecode app  by the send 
 to program command from  other livecode app (wich run on an another mac on the 
network), UNLESS i switch  on the target mac from livecode to another app and 
then come back . Then the handler begin to run . So ?


Le 8 déc. 2012 à 21:43, J. Landman Gay a écrit :

> On 12/8/12 2:40 PM, J. Landman Gay wrote:
>> On 12/8/12 1:31 AM, Serge Brami wrote:
>>> I want to send an Applevent  to another livecode app running  on an
>>> other Mac on a local network.
>>> 
>>> for example
>>> 
>>> on the Mac 1  a button  with the script :
>>> "on mouseup
>>>     send "hello" to "Mac2:livecode"
>>> end mouseup"
>>> 
>>> 
>>> 
>>> on the Mac 2
>>> 
>>> "on appleevent type
>>>     if type is "aevt" then
>>>       put "hello"
>>>     end if
>>> pass applevent
>>> end applevent
>>> 
>>> 
>>> Well it works BUT only il on mac2 I switch from livecode to another
>>> app and then switch back to livecode
>> 
>> I haven't used appleEvents for years, but the way I'd debug this would
>> be to change the receiving handler to show the parameters and see what
>> you get:
>> 
>> on appleevent
>>  repeat with x = 1 to the paramcount
>>    put x && "=" && param(x)
>>  end repeat
>> end appleevent
>> 
>> That may show you what is being sent and give you an idea of what's
>> wrong. The type may not always be "aevt".
>> 
> 
> Actually, my suggested handler will go by too fast to see. Better change it 
> to accumulate the info like this:
> 
> on appleevent
> repeat with x = 1 to the paramcount
>   put x && "=" && param(x) & cr after tList
> end repeat
> put tList -- or you can use "answer tList"
> end appleevent
> 
> 
> -- 
> Jacqueline Landman Gay         |     jac...@hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to