forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappleEvent.lcdoc
More file actions
58 lines (42 loc) · 1.65 KB
/
appleEvent.lcdoc
File metadata and controls
58 lines (42 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Name: appleEvent
Type: message
Syntax: appleEvent <pClass>, <pID>, <pSender>
Summary:
the <current card> whenever the <application> receives an <Apple event>.
Associations: card
Introduced: 1.0
OS: mac
Platforms: desktop
Example:
on appleEvent theClass,theID
-- execute a set of statements in a text file
if theClass is "misc" and theID is "dosc" then
request appleEvent data -- get the content of the AppleEvent
do URL ("file:" & it)
end if
pass appleEvent
end appleEvent
Parameters:
pClass:
The class and ID together identify the exact Apple event that was
received.The class parameter is the event class: possible classes
include aevt (for required Apple Events such as "open document" and
"print" ), misc (for miscellaneous events such as "do script" ), and
others.
pID:
The ID parameter is the name of the specific Apple event.
pSender:
The sender parameter is the address of the process that sent the Apple
event.
Description:
Handle the <appleEvent> <message> to respond to a custom <Apple event>,
or one that you want to handle specially.
Use the request appleEvent <command> to obtain the data associated with
an <Apple event>.
For more information about Apple events, refer to the section entitled
"Apple Events Sent by the Mac OS" in the technical documentation
located on [Apple's website]
(https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_handle_AEs/SAppsHandleAEs.html#//apple_ref/doc/uid/20001239-1117769)
References: send to program (command), flushEvents (function),
application (glossary), current card (glossary), Apple Event (glossary),
command (glossary), message (glossary)