I wrote the below macro to start safari and log onto a specific website.
The macro is not reliable; specifically sometimes the first tab command (coloured in green) is needed and sometimes it is not (i.e. it overshoots and the username is entered into the password feel).
Would appreciate your assistance and input into a more reliable way of doing this.
What I do to fix this sort of thing is use the mouse action to click in the text box that you want to make active. but since the box you want is a text input box, I believe there are better ways of solving this using this action: (where you use the pull down arrow to the right of the word "Safari" to fetch the name of the input box.)
Warning, I have no experience with this action so there's a 30% chance I'm wrong.
This works with Safari 14.1.2 on Mojave but may require adjustment for later versions of macOS.
Close the Private Browsing Notice in a Safari window:
# Close Private Browsing Notice
tell application "System Events"
tell application "System Events"
tell application process "Safari"
tell (first window whose subrole is "AXStandardWindow")
try
tell splitter group 1
tell tab group 1
tell group 2
tell button 1
if exists of it then
perform action "AXPress"
end if
end tell
end tell
end tell
end tell
end try
end tell
end tell
end tell
end tell
This will fail silently if the notice does not exist.
Found images are great, but they can be finicky. I never use them, unless I have no choice – or I'm doing something quick and dirty that's temporary.
Apologies for my naivety but I took a look @appleianer script that he was kind enough to post but do not understand how my username and password get added.
I did tried adding text to clipboards -> paste but it failed.
@Joel, if you had run the macro once, you would not ask this question?!
How long have you been using 1Password? Did you just start using it?
In 1Password you create your login for websites like this:
Username
login
URL of the website where the login request appears.
Furthermore the browser add on for your browser (Safari) is installed.
If the 1Password Mini is unlocked and I open the URL, the username and password are automatically entered. This is exactly what you can see in the video I posted.
Script? I have not posted any script in this post. It's just KM actions in a macro
I have been using 1Password for a very long time and have been beta testing their software when one still had to apply and it was limited to a select group, so iI know it well.
In case anyone has any doubt, I did try to run the macro before asking / posting any questions.
In case anyone has any further doubts, the macro DID not work for me. Specifically, I received the below error messages:
Nothing would please me that to find a better and more reliable way to enter credentials that I am currently using so -- with that said -- please let me know how to resolve the errors I am getting.
Appreciate that, it helped a bit in that the script no longer burps (i.e. it runs) but it is still having trouble filling in the credentials reliably, very frustrating. I think that the Josh website is just one of those troublesome websites.
One follow up please, can someone please explain to my how the script works as I don't understand how it gets the URL or the credentials.
I have struggled for hours -- literally 10 hours and countless macros -- to get a simple webpage to open properly. Is it me, am I dealing with a super difficult webpage, do others have this problem (i.e. website login is tough to automate, etc.
Worth noting, the two macros I am currently playing with are @appleianer (which I hope someone can explain to me how it works / what it does) and the one that I posted above that uses @gglick's trick of copying the 1Password 8 URL.
Would appreciate and and all help in getting this to be reliably, it is driving me nuts!
Firstly – why aren't you filling the josh.io credentials with 1Password to begin with?
As I mentioned – @appleianer's macro uses 1Password's inline UI for Safari.
The macro assumes you've already unlocked 1Password.
It selects the email field and presses the down-arrow to reveal the UI:
The macro then presses down-arrow again and return – this fills both fields, and the following return submits the credentials.
You never have to get your credentials into the macro.
But perhaps the 1Password 8 beta doesn't work properly...
If you have to you can:
Select the email field with the correct browser action.
Pause slightly.
Type or paste your email address with the insert-text action.
Select the password field with the correct browser action.
Pause slightly.
Type or paste your password with the insert-text action.
Type return.
I made this sequence work when I was testing.
You'll have to put your password in the keychain, because you can't script it out of 1Password – unless of course you want to manipulate the 1Password UI – which I would rather NOT do.
There is also @gglick's idea, which I think is in another thread. I would probably put that URL with the embedded credentials in the KeyChain myself.
You're trying to run, before you can walk. Slow down a bit, and take a breath.
Yes – your site is recalcitrant – but as I said, I got a simple macro working with not too much fuss. I'd post it, but it's already been round-filed.
Chris, this is exactly what I am doing, using the credentials from 1Password as noted in @appleianers macro.
The problem is that it dos not seem to be working consistently, at least on my laptop. I can take a video and post it short you wish (i.e. via screen recording), would that assist?
Understood which is why I WOULD LOVE TO GET THIS WORKING!
I cannot test that as rollback is a bit of an issue, at least that is what I understand to be the case.
Yes, I tried that for hours too! Very inconsistent results!