Detecting Safari Web page loading
Detecting Safari Web page loading
- Subject: Detecting Safari Web page loading
- From: Takaaki Naganoya <email@hidden>
- Date: Mon, 19 Mar 2018 23:11:51 +0900
Hi, everyone.
Can we detect Safari’s web loading event from external AppleScript?
A notification listening script reports
“com.apple.CFNetwork.CookiesChanged.XxXXXXXXXxXxXXxXxxXXXxXXxXxXXXxxXXXXXxxX”
with Safari’s loading new URL.
<AppleScript>
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
set |center| to my NSDistributedNotificationCenter's defaultCenter()
|center|'s addObserver:me selector:"notify:" |name|:(missing value)
object:(missing value)
on notify:notification
log {aName}
end notify:
on message(title, subtitle, msg)
set notification to my NSUserNotification's alloc()'s init()
set notification's title to title
set notification's subtitle to subtitle
set notification's |informativeText| to msg
my (NSUserNotificationCenter's defaultUserNotificationCenter()'s
deliverNotification:notification)
end message
</AppleScript>
--
Takaaki Naganoya
email@hidden
http://piyocast.com/as/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden