Re: Safari app scripting
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