• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Detecting Safari Web page loading
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Detecting Safari Web page loading
      • From: Takaaki Naganoya <email@hidden>
    • Re: Detecting Safari Web page loading
      • From: Hermann BRILLANT <email@hidden>
  • Prev by Date: Re: Reading Calendar events - need comments/suggestions
  • Next by Date: Re: Detecting Safari Web page loading
  • Previous by thread: Re: Applescript in El Capitan Mail rule processes the wrong message
  • Next by thread: Re: Detecting Safari Web page loading
  • Index(es):
    • Date
    • Thread