{"identifier":73723,"topic":"System messages","name":"appleEvent","text":"<code><pre>appleEvent <i>class, id, sender<\/i>\n<\/pre><\/code> Handler: <br><br>\n\n <code><pre>on appleEvent class, id, sender\n   <i>statements<\/i>\nend appleEvent\n<\/pre><\/code>\nHyperCard sends the<code> appleEvent<\/code> message to the current card when it receives an Apple event from another program. It sends the message at idle time as soon as all pending handlers have finished running. <br>\n<br>\n<i><code>class<\/i> <\/code>is the general category of the event (such as<code> aevt <\/code>or<code> misc<\/code>),<i><code> id <\/i><\/code>is the actual event received (such as<code> odoc, pdoc, dosc, <\/code>or<code> eval<\/code>), and<code> <i>sender<\/i> <\/code>is the name of the application or process that sent the event. <br><br>\n\n Because Apple event commands are usually generated by other processes, you may want to check to make sure that they are not destructive. Click Examples to see a handler, written for the Home stack, that intercepts an incoming Apple event. <br>\n","related":{"97817":"reply","98925":"request"},"examples":"on appleEvent class, id, sender\n  answer \"HyperCard has received an AppleEvent!\" & return & \u00ac\n  \"The class is\" && class & return & \u00ac\n  \"The ID is\" && id & return & \u00ac\n  \"The Sender is\" && sender with \"Allow\" or \"Deny\"\n  if it is \"Allow\" then pass appleEvent\nend appleEvent","demo":"","debug":{"9":["appleEvent class, id"],"10":["class is the general"]}}