Hi folks,

I'm trying to automate login at this page:

https://online.bulbank.bg/page/default.aspx?xml_id=/bg-BG/.login

My code goes the following way:

 Code:
Break On

$URL = "https://online.bulbank.bg/page/default.aspx?xml_id=/bg-BG/.login"

$IE = CreateObject("InternetExplorer.Application")

$IE.Visible = 1

$IE.Navigate($URL)

While $IE.Busy and $IE.ReadyState <> 4 and @ERROR = 0 Loop

$IE.Document.getElementById("userName").Value = "myusernamehere"
$IE.Document.getElementById("pwd").Value = "mypasswordhere"


So far so good... but there is such option in the HTML that checks if button is pressed:
 Code:
<script>
varLoginOnSubmit = document.forms[0].onsubmit;
 
 document.forms[0].onsubmit = function ()
 {
   if(pressed==0)
   {
   alert(STR_EMPTY_LOGIN)
   return false;
   }
    
     if (null != varLoginOnSubmit) return varLoginOnSubmit();
      return true;
 }
</script>


How can I set this pressed == 0 to be pressed == 1 ?

And also if you can tell me which is the button I have to click in order to login ...... I couldn't find it in the page's source, I'm ashamed.

Many thanks in advance !