do shell script "open -a safari 'https://login.binck.nl/klanten/Login.aspx?ReturnUrl=%2fklanten%2fdefault.aspx'" tell application "Safari" activate tell document 1 repeat until ((do JavaScript "location.host") is "login.binck.nl") delay 1 end repeat do JavaScript "document.getElementById('ctl00_Content_Gebruikersnaam').value='username';document.ge tElementById('ctl00_Content_Wachtwoord').value='password';window.open(document.g etElementById('ctl00_Content_LoginButton').href, '_self', 'true');" end tell end tell