Questions tagged [appleevents]

An Apple event is a type of interprocess message that can specify complex operations and data.

An Apple event is a type of interprocess message that can specify complex operations and data. Apple events allow you to gather all the data necessary to accomplish a high level task into a single package that can be passed across process boundaries, evaluated, and returned with results. The Mac OS uses Apple events to communicate with applications. Apple events are also an essential part of the AppleScript scripting system, which allows users to automate actions using scriptable applications—applications that can respond to a variety of Apple events by performing operations or supplying data.

84 questions
0
votes
1 answer

applescript times out when launching terminal

I have a script wherein I need to run an executable from a terminal the script is as below tell application "Terminal" activate set run_cmd to "sudo " do script run_cmd end tell but this times out with the…
Abbas
  • 3,144
  • 2
  • 25
  • 45
0
votes
1 answer

Opening Messages programatically with pre filled fields on macOS

I am trying to make QR codes actionable on macOS. I found that I can open Messages app just by using imessage as URI or sms as URI: NSString *message = @"imessage://your@appleid.com"; [[NSWorkspace sharedWorkspace] openURL:[NSURL…
Marek H
  • 5,173
  • 3
  • 31
  • 42
0
votes
0 answers

Coding Apple Events

I have an very simple AppleScript: tell application "Opera" get URL of active tab of window 1 end tell This is the translation to AppleEvents: osascript browser.scpt {core,getd target='psn '[Opera] {----={form=prop,want=prop,seld=URL…
RuLoViC
  • 825
  • 7
  • 23
0
votes
1 answer

Translate into Apple Events AppleScript

I have an very simple applescript: tell application "Opera" get URL of active tab of window 1 end tell I want to see Apple Events underlying. So I have launched it with these two environment variables enabled: export AEDebugSends=1; export…
RuLoViC
  • 825
  • 7
  • 23
0
votes
1 answer

Get Apple Events from AppleScript

I have a simple AppleScript which tells me url of active window in specific browser tell application "Opera" get URL of active tab of window 1 end tell However I would like to see Apple Events needed to run that script, probable some of these:…
RuLoViC
  • 825
  • 7
  • 23
0
votes
1 answer

Unable to find definition for this Carbon/Apple Events Error

Can anyone tell me where I can find Carbon Error -1743? I have an AppleEvent I'm sending from one app to another that's worked up to this point but fails in Mojave.
iluvcapra
  • 9,436
  • 2
  • 30
  • 32
0
votes
0 answers

How does one use `AE.framework` (in `CoreServices.framework`) to manually build and send events?

I previously used the ScriptingBridge.framework, but found that the performance was terrible for what I was doing (retrieving very large lists of reminders), whereas the AppleScript equivalent is much faster due to the way it constructs the request…
Ontonator
  • 319
  • 3
  • 17
0
votes
1 answer

How to send a string from an Apple script

I code in REALbasic. Whenever I receive an IM via iChat, iChat runs an applescript and sends to it the last message received. I need to somehow forward this message as a string to the app I'm writing in REALbasic. REALbasic is able to respond to…
Garry Pettet
  • 8,096
  • 22
  • 65
  • 103
0
votes
1 answer

Is it possible to use Apple Events to communicate with applications from C or D?

I am looking to interact with other applications from a D application (which can interop with C) through the Apple Events system without embedding AppleScript, JSX or the like. There are few documents on the subject of sending Apple Events from…
Ontonator
  • 319
  • 3
  • 17
0
votes
2 answers

How can I do AppleScript's «event aevtrlgo» in JavaScript?

On macOS, the osascript command line tool can be used to run AppleScript and JavaScript, both of which have access to the Apple Events API. For most of the API, the translation is quite straightforward. E.g. tell application "Terminal" to…
Siguza
  • 21,155
  • 6
  • 52
  • 89
0
votes
1 answer

Where is the leak?

I have a memory leak in this code. I am busting it since 2 weeks and I am starting to be mad. Thanks in advance for your help :) +(void) makeEvent:(int) event:(AppleEvent *)theEvent { int sig = 'dock'; OSErr err; AEAddressDesc…
AP.
  • 5,205
  • 7
  • 50
  • 94
0
votes
1 answer

respond to Apple Events in Python without using pipe characters around keys in dictionary

I use appscript and aemreceive in a py2app bundled Python 2.7 application to accept incoming Apple Events and return my app's output as Apple Events to the external application which communicates with my app. This works quite well, with one…
André Aulich
  • 190
  • 10
0
votes
1 answer

SBApplication : how to send raw data

I woudl like to send raw data (a void*) using SBApplication sendEvent Unfortunaltly I've found no documentation about this. Do you have any idea to achieve this? Thanks in advance for yoru help, Regards,
AP.
  • 5,205
  • 7
  • 50
  • 94
0
votes
2 answers

appleevent versus notification

I am looking for a high performance inter process communication system in macos X. What is the best system? AppleEvents or NSNotifications?
AP.
  • 5,205
  • 7
  • 50
  • 94
0
votes
2 answers

sending Apple event to console application

I have console app named "MyApp" it is running and I see it in the activity monitor. I'm writing in AppleScript Editor the script: tell application "MyApp" display dialog "Hello World" end tell When running the script the editor asks me where is…
Sanich
  • 1,739
  • 6
  • 25
  • 43