Jump to content

ilikecl

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ilikecl's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Nice! Unfortunately for me, I needed this to work on a headless server I had, so I ended up compiling a Python script into 2 separate apps that use the SS API for OFF and HOME functions.
  2. Do you mean _IEFormElementSetValue? (https://www.autoitscript.com/autoit3/docs/libfunctions/_IEFormElementSetValue.htm) I've tried that previously, and it used to work on the site, but it seems in their last update they've updated to AngularJS, as far as I can tell, and they've added form field validations that prevent _IEFormElementSetValue from working. 😥
  3. Hi All, So my initial issue with being unable to automate a login was solved, but it turns out it doesn't work with my server when Remote Desktop is locked, thus failing when running from the Task Scheduler. DOH! I've taken a look at the FAQ and tried to update my script to use the suggested ControlSend() etc. commands, but it doesn't seem to work. As I am not a developer, I suspect my syntax is wrong or I am missing some steps. Any help/pointers would be appreciated! Code that works when Remote Desktop is active (Using Send() because it seems there is form field validation that prevents me from using _IEFormElementSetValue()): Func SignIn();function to login to the Simplisafe website Global $oIE = _IECreate("https://webapp.simplisafe.com/#/login"); login page Sleep(5000) WinActivate("SimpliSafe Control Panel - Internet Explorer") Sleep(5000) Local $username = _IEGetObjByName ($oIE, "email");sets the variable to the input name on the page (F12, DOM) Local $password = _IEGetObjByName ($oIE, "password");sets the variable to the input name on the page (F12, DOM) _IEAction ($username, "focus") Sleep(2000) Send("EMAIL") Sleep(2000) _IEAction ($password, "focus") Sleep(2000) Send("PASSWORD") Sleep(2000) Local $cButtons = _IETagNameGetCollection ($oIE, "button") For $oButton in $cButtons If $oButton.innerText = "log in" Then _IEAction ($oButton, "click") _IELoadWait ($oIE) ExitLoop EndIf Next EndFunc
  4. Not sure if you figured this out or not. I ran into the same issue, but solved it by making IE the active window, then focusing on the form fields and using Send() to simulate sending in the email and password. Hope that helps.
  5. Thank you much! That worked great! 😀
  6. Hi All, I've been using AutoIt to automate logging into a website and doing some setting updates for several years now. The services as updated its login page a couple times over the years, but I've always managed to get it going. However, this latest update has me stumped on how to use AutoIt for it. I am not a developer, so I am at a loss on what to do here. I am able to fill in the form for email and password using _IEGetObjByName, but the log in button no longer has a name specified. I've searched the forums and tried a couple of different solutions using _IEFormElementGetCollection and _IEFormSubmit that didn't seem to work. I suspect I am doing something wrong. Any help would be greatly appreciated! Thank you! The DOM: <div class="login ng-scope" ng-class="{'processing-login-request': login.processingLoginRequest}"> <div class="decoration-plant"></div> <div class="decoration-keyfob"></div> <div class="login-container"> <div class="login-heading" ng-init="login.setTextResources({&quot;ButtonOk&quot;:&quot;ok&quot;,&quot;ButtonTryAgain&quot;:&quot;try again&quot;,&quot;MessageResetPasswordSuccess&quot;:&quot;Check your email. We’ve sent you instructions for resetting your password.&quot;,&quot;MessageResetPasswordFailure&quot;:&quot;We couldn't process your request. Please check your internet connection and try again in a few moments.&quot;})"><!-- ngIf: !login.wasLoginChallenged --> <div class="heading-title ng-scope" ng-if="!login.wasLoginChallenged"> <span class="logo"></span></div> <!-- end ngIf: !login.wasLoginChallenged --><!-- ngIf: ssLogoutDueToInactivity --></div> <!-- ngIf: !login.showResetPassword && !login.wasLoginChallenged --> <div class="login-box login ng-scope" ng-if="!login.showResetPassword &amp;&amp; !login.wasLoginChallenged"><!-- ngIf: !ssLogoutDueToInactivity --> <div class="login-title ng-scope" ng-if="!ssLogoutDueToInactivity">Log In</div> <!-- end ngIf: !ssLogoutDueToInactivity --> <div class="login-entry"><input name="email" class="email ng-pristine ng-untouched ng-valid ng-empty ng-valid-email" aria-invalid="false" type="email" placeholder="email" ng-keyup="$event.keyCode === 13 ? login.login() : null" ng-model="login.username"></div> <div class="login-entry"><input name="password" class="password ng-pristine ng-untouched ng-valid ng-empty" aria-invalid="false" type="password" placeholder="password" ng-keyup="$event.keyCode === 13 ? login.login() : null" ng-model="login.password"></div> <!-- ngIf: login.wasLoginError --> <!-- ngIf: login.wasLoginErrorBruteForce --> <div class="login-link forgot"><span tabindex="0" class="ss-inline-text-action" role="button" ng-click="login.showResetPassword = true">Forgot your password?</span></div> <div class="login-entry" ng-class="{'processing-login-request': login.processingLoginRequest}"><button class="ss-standard-button" type="button" ng-click="login.login()">log in</button></div> <div class="login-link register"><div tabindex="0" class="ss-inline-text-action new-user" role="button" ng-click="login.navigateToRegister()">New user? Register here.</div> </div> </div> <!-- end ngIf: !login.showResetPassword && !login.wasLoginChallenged --> <!-- ngIf: login.showResetPassword --> <!-- ngIf: login.wasLoginChallenged --> </div> </div> My AutoIt Script: Func SignIn() Global $oIE = _IECreate("XXXXXXX"); login page Local $username = _IEGetObjByName ($oIE, "email");sets the variable to the input name on the page (F12, DOM) Local $password = _IEGetObjByName ($oIE, "password");sets the variable to the input name on the page (F12, DOM) Local $submit = _IEGetObjByName ($oIE, "log in");sets the variable to the input name on the page (F12, DOM) _IEFormElementSetValue ($username, "XXXXXXX");Put your username here between the quotes. This will then send what you've set to the variable input name set above. _IEFormElementSetValue ($password, "XXXXXXX");Put your password here between the quotes. This will then send what you've set to the variable input name set above. _IEAction ($submit, "click"); clicks the input 'op' we set as $submit above EndFunc
×
×
  • Create New...