it’s rather simple example - when Safari or Chrome opened, pressing F1 adds title and subtitle of current page in tab to Reminder list “2Read”. Something like mini-Instapaper.
But…
On 10.8 it worked in blink of an eye. Not sure how 10.9 because I switched from ML to Yosemite and then to El Cap.
On these system macro is painfully slow. I assume it has to be something with osascript. I reported bug for Apple - waiting for their response few months, and still no solution.
On my machine such macro now runs for 10-13 seconds! and Reminders got beach ball of death.
Does anyone can confirm?
How to debug what’s going on under the hood and what is the reason for such behaviour
------------------------------------------------------------
# Auth: Christopher Stone <scriptmeister@thestoneforge.com>
# dCre: 2015/10/26 04:49
# dMod: 2015/11/10 22:10
# Appl: Reminders, Safari
# Task: Create Reminder from front Safari page.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @Reminders, @Safari
------------------------------------------------------------
set _date to (current date) + (1 * days)
tell application "Safari"
tell front document
set _url to its URL
set _name to its name
end tell
end tell
tell application "Reminders"
activate
tell list "Reminders → iCloud"
set newReminder to make new reminder with properties {name:_name, body:_url, remind me date:_date}
show newReminder
end tell
end tell
------------------------------------------------------------
This is really faster. Information is added correctly to Reminders list but then for few more seconds Reminders got beach ball of death.
Soo…what the hell?
In the Activity Monitor utility, select Reminders.
While Reminders is beach-balling, click the Activity Monitor Sample button. This will generate a sample of what it is doing.
File a bug report with Apple via the bugreporter. Ideally include a method of causing the bug that works from running your script in Script Editor directly, that way it is only Apple software involved and they don’t have an opportunity to point the finger elsewhere.
Several of my macros are extremely slow and some don’t finish at all. Mouse clicks and insertions of text also either don’t happen or happen so slowly it’s not worth the effort. On El Cap on a 2013 Mac Pro.
I reinstalled the KM app and it seems to have fixed the problem. If it arises again, I’ll send the macros, but it was pretty much across the board. Thanks for your response.
It’s still and on and off proposition for me. Sometimes it works ok. Other times it stalls, doesn’t complete a macro, or just plain doesn’t respond. More so in some app than in others, but not mutually exclusively. Safari might be slow to allow a macro. GO to the Finder and the same macro works fine. Other times the same macro works in Safari but not in the Finder. Same goes for 3rd party apps. Hit and miss. Mostly miss.