Thursday, August 11, 2022

#1 2022-05-07 08:28:24 am

scrutinizer82
Member
Registered: 2015-08-04
Posts: 130

The response mechanics of built-in event handlers

...especially, the response frequency. Regarding Messages, I want to incorporate the message received handler to send a message to a sender if the received message has particular text. I need the handler to fire up with a frequency no bigger than once when the condition becomes valid during a pre-defined period, say, a month. Are these handlers designed to emit one-off responses, or do I have to write out the frequency conditions?

HMgkZUN.jpeg

Model: MacBook Pro 9,1 (mid-2012 15") Core i7 2.3 GHz, 16 GB RAM, 1TB SSD
AppleScript: 2.7
Browser: Safari 605.1.15
Operating System: macOS 10.14


Scripting in Mac OS X 10.7.5, OS X 10.9.5, macOS 10.14.6

Offline

 

#2 2022-05-22 09:50:08 pm

scrutinizer82
Member
Registered: 2015-08-04
Posts: 130

Re: The response mechanics of built-in event handlers

In reply to myself: turns out every built-in handler all over scriptable applications is an event listener, and it's "event" that the symbol "E" to the left of an individual handler in the Dictionary stands for. By default it accepts an "event" (such as a message, an e-mail) in a continual fashion with or without pre-written code to process it. It's what this code is about determines what actions defined by a scripter/programmer are applied to yield a result. This part is good because it's educational.
The bad part is that for the macOS newer than High Sierra the response to the events framework in Messages was deliberately dismantled by Apple by removing the ability to add scripts in the General Preferences of Messages present all through the ages (since good ol' iChat).

Last edited by scrutinizer82 (2022-05-25 07:59:56 am)


Scripting in Mac OS X 10.7.5, OS X 10.9.5, macOS 10.14.6

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)