sending appleevent with custom parameters
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
sending appleevent with custom parameters
Hi Livecoders,
Completely new to appleevents within Livecode,
I'm stuck with this question:
how do I *send* an event with custom parameters?
Thanks for any hints
Regards,
Thierry
Completely new to appleevents within Livecode,
I'm stuck with this question:
how do I *send* an event with custom parameters?
Thanks for any hints
Regards,
Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
-
- VIP Livecode Opensource Backer
- Posts: 10053
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: sending appleevent with custom parameters
I believe arbitrary data is normally sent as the payload with a "send <message> to <app>" command, no?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: sending appleevent with custom parameters
Umm, may beFourthWorld wrote:I believe arbitrary data is normally sent as the payload with a "send <message> to <app>" command, no?

This works:
Code: Select all
send "xyz.txt" to program "anApplication" with "aevtodoc"
How would do you that?
Regards,
Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
-
- VIP Livecode Opensource Backer
- Posts: 10053
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: sending appleevent with custom parameters
I'll have to leave that to someone with more AppleScript experience. For IAP I generally just use sockets, much faster and cross-platform.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: sending appleevent with custom parameters
This is a no-go for me in my context!FourthWorld wrote:I'll have to leave that to someone with more AppleScript experience. For IAP I generally just use sockets, much faster and cross-platform.
AppleEvents are my only option

Regards,
Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
-
- VIP Livecode Opensource Backer
- Posts: 10053
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: sending appleevent with custom parameters
Do you really need "Revo" as a custom param? If you're also writing the recipient, couldn't any additional data be sent with the payload?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: sending appleevent with custom parameters
Hi Thierry,
http://forums.runrev.com/phpBB2/viewtop ... f=8&t=4960
there is an example how to do applescript variables in Livecode and send them with the body of the applescript.
Kind regards
Bernd
http://forums.runrev.com/phpBB2/viewtop ... f=8&t=4960
there is an example how to do applescript variables in Livecode and send them with the body of the applescript.
Kind regards
Bernd
Re: sending appleevent with custom parameters
Thanks Bernd, I'll read all that carefully but my feeling is that won't work.bn wrote:there is an example how to do applescript variables in Livecode and send them with the body of the applescript.
@Richard: yes, the external app is waiting for it, so it can send back to Livecode
other's events when necessary. And I don't have any control on this app, except to talk
with it the way it has to be!
By the way, the "send to program in the dictionnary" is a bit weird...
( text missing, dead link to some references)
Doesn't look like a lot of coders have read this?
Regards
Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
Re: sending appleevent with custom parameters
Hi,

Well, all is saidFrom Runrev support:
It is unfortunately not possible to send multiple parameters with an AppleEvent in LiveCode.
I confirmed this with our developers who looked at
how we handle Apple events via the current implementation of the “send to
program” command within the engine.
At present is only supports one parameter.
There is a light at the end of the tunnel though, as there was some discussions of
updating this ..

!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!