• 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
Re: Safari app scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Safari app scripting


  • Subject: Re: Safari app scripting
  • From: "Robert (PTBG)" <email@hidden>
  • Date: Tue, 14 Aug 2018 04:35:08 +0100


> On 14 Aug 2018, at 01:35, Christopher Stone <email@hidden>
> wrote:
>
> On 08/13/2018, at 09:52, Robert (PT Business Groups)
> <email@hidden <mailto:email@hidden>> wrote:
>> An Applescript novice here …..
>>
>> I use the Safari app in High Sierra and have several scripts that run nicely
>> for it.
>>
>> One small issue that I can’t get past in my scripts is to be able to open a
>> new window (make new document) without it accessing the default homepage.
>
>
> Hey Robert,
>
> Welcome to the world of Mac Automation.  :)
>
> Here are a couple of examples of things you can do:
>
> -----------------------------------------------------------------
>
> tell application "Safari"
>     make new document with properties {URL:"https://etrecheck.com
> <https://etrecheck.com/>"}
>
>     tell front window
>         make new tab at end with properties {URL:"https://bombich.com
> <https://bombich.com/>"}
>         set current tab to last tab
>     end tell
>
> end tell
>
> -----------------------------------------------------------------
>
> --
> Best Regards,
> Chris
>

Hello Mr Stone and thanks for the welcome - and your suggestions.

I worked your code into my script and I think I like it.

It solved all my queries except one.

If Safari isn’t running and you activate it, it opens with the homepage set in
the prefs.

If Safari isn’t running and you launch it, it seems to open with no windows -
which solves my issue.
(I came across this by pure chance).

Thank you once again.

Robert.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/
 _______________________________________________
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

References: 
 >Safari app scripting (From: "Robert (PT Business Groups)" <email@hidden>)
 >Re: Safari app scripting (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Safari app scripting
  • Next by Date: Re: Safari app scripting
  • Previous by thread: Re: Safari app scripting
  • Next by thread: Re: Safari app scripting
  • Index(es):
    • Date
    • Thread