realbasic-nug
[Top] [All Lists]

Re: Sending Apple Events

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Sending Apple Events
From: James Sentman <james at sentman dot com>
Date: Wed, 30 Jan 2002 16:13:20 -0500
Creating an event target with the newappleeventarget is broken in RB4. It works sometimes if you display the select box instead of just creating it yourself, but then you can't save it and you have to re-select it each time the program runs.

I have realbugged this, but since there are only about 4 people that care about apple events it doesn't get moved up the list. Perhaps if they knew there were 5 people that needed this it would get done;)

Oh, and it's completely broken on OSX, but thats not RB's fault it's not implemented yet in OSX. for that you need to write some feedback to Apple.

This is one of the few missing features from OSX that I really do miss.

-James

Since I now realize your living and well Matt, could you please give me an idea were I'm getting off base trying to send an apple event to a remote machine on a
LAN. I am basing my code off the example on page 597 - 600 of your first
edition. Both machines are set up for program sharing and are connected (at
least they seem to be). I first tried the Apple Event Scriptability example
which was successful. My next step was to try the remote Targets example Page 597 to bring up the "About This Computer" window. This did not work. I did not
even get the remote login dialog the first time I ran it. I was wondering what
the port code should be? What application am I sending it to (the Finder)?
MACSep01, excluding the ep01 looks like a creator code of some app you are
running (confused).

After failing here, I attempted to send an appleevent from a remote machine on
the LAN to snortiblog, which did not work either.  I know this is my lack of
understanding. Could you or anyone else help me with the code below.
The code on the remote is on page 599 and works, at least with both apps on the
same machine.

dim targ as appleEventTarget
  dim a as appleEvent
  'dim o as appleEventObjectSpecifier
  targ = newappleEventTarget("snortiblog","My Other Machine","*","????ep01")
  a = targ.newAppleEvent("your", "name")
  'o=getpropertyObjectDescriptor(nil,"abbx")
  'a.objectSpecifierParam("----") = o
  if a.send then
    msgbox a.replyString
  end


---
Subscribe to the digest:
<mailto:realbasic-nug-digest at lists dot realsoftware dot com>
Unsubscribe:
<mailto:realbasic-nug-off at lists dot realsoftware dot com>


--
_________________________________________________________________________
James Sentman <james at sentman dot com>                  http://www.sentman.com
  Enterprise server monitoring with:    http://whistleblower.sentman.com/


<Prev in Thread] Current Thread [Next in Thread>