Friday, November 6, 2026
HomeApplemacos - Applescript for Safari AUTOMATION -- any recommendation, data, tip and...

macos – Applescript for Safari AUTOMATION — any recommendation, data, tip and so on —

[ad_1]

PreNote: I’m open and hungry for any data, recommendation, tip and so on.

Whats up Everybody!

I’m attempting to create automation with applescript. That is my first private applescript activity however I’ve some precious questions. Principally I’m attempting to catch stay notifications from a web site and show them in mac os notification.

I’m attempting to construct course of for a number of days however I do not need to give a large number to you 🙂 so I’ve roughly defined my course of beneath.

(* Variables utilized in entire course of

set $webToCheck > That is Safari webpage which I need to run my script on it. It will not be entrance window, script ought to be run with its identify or different property.

set $theClass > That is class identify of DOM ingredient to examine whether it is exist or not. This class isn't at all times exist on DOM of $webpage. It comes with notifications so when use it in "do Javascript" I obtained error "variable isn't outlined"

set $num > variety of class to make use of in "do Javascript"

set $enter > variable to assign HTML textual content

set $modifiedInput > Textual content of enter seperated from HTML tags

*)


        -- Step 1

inform software "Safari"

work on $webToCheck

        -- Step 2

repeat till $enter isn't empty

set enter do Javascript

doc.getElementsByClassName > $theClass, $num of $webToCheck

finish repeat

        -- Step 3

modify textual content of $enter to seperate from RAW HTML -- For instance: <a category="" worth=""> TEXT to be seperated </a>

Show notification $modifiedInput

        -- Step 4

Return to step 1 or 2 to examine and show notification once more

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments