Jump to content
Sign in to follow this  
Seminko

[SOLVED] IE.au3 can't login when $Visible = false

Recommended Posts

Wrote a script that grabs all of the IP addresses from Netflix's IP log, checks the IPs and returns suspicious activity.

Everything works as it should but only when _IECreate is set to visible. When visible is set to false, it fails to login for some reason.

Any ideas what might cause it and/or how to circumvent that?

Edited by Seminko

Share this post


Link to post
Share on other sites
1 minute ago, Seminko said:

Any ideas what might cause it and/or how to circumvent that?

No

You can't really expect any either considering the information you've given us.

Post the script you're using, and what the results are supposed to be.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
1 hour ago, BrewManNH said:

No

You can't really expect any either considering the information you've given us.

Post the script you're using, and what the results are supposed to be.

The idea was that someone who really uses IE.au3 might have come across such a thing --> working when Visible = True, not working when Visible = false. In that case, the script would not be needed.

But I get your point, here:

[redacted]

Edited by Seminko

Share this post


Link to post
Share on other sites

Just found WinSetState... making the window visible at specific points makes the debugging easier...

 

EDIT: it seems that when the window is not visible, the password is put in but when the pass input loses focus, the password diasppears. It does the same thing when IE is visible, however I circumvented that by clicking the label first. That, unfortunatelly, doesn't work when IE is not visible...

EDIT2: netflix.com must have some form of a check whether the window is visible / in focus etc...

Edited by Seminko

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Zaoka
      I'm trying to create script that would login on my SAP WEBI "web page" and replace some uploaded excel files. But i'm having problem on even the log in.
      These are user fill elements with Firefox Inspector
      <input type="text" id="_id0:logon:CMS" name="_id0:logon:CMS"> <input type="text" id="_id0:logon:USERNAME" name="_id0:logon:USERNAME"> <input type="password" id="_id0:logon:PASSWORD" name="_id0:logon:PASSWORD"> LogOnButton
      <input type="submit" id="_id0:logon:logonButton" value="Log On" class="logonButtonNoHover logon_button_no_hover" onmouseover="this.className = 'logonButtonHover logon_button_hover';" onmouseout="this.className = 'logonButtonNoHover logon_button_no_hover';">  
       
      My example, I tried _IEGetObjByName and _IEGetObjById but the script only open page but will not even fill out the form
        #include <IE.au3> Call("signIn") Func signIn() Global $oIE = _IECreate("http://192.xxx.xxx.xx:xxx/BOE/BI") Sleep (5000) Local $server = _IEGetObjByName($oIE, "_id0:logon:CMS") Local $username = _IEGetObjByName($oIE, "_id0:logon:USERNAME") Local $password = _IEGetObjByName($oIE, "_id0:logon:PASSWORD") Local $button = _IEGetObjById($oIE, "_id0:logon:logonButton") _IEFormElementSetValue($server, "TestServer:1000") _IEFormElementSetValue($username, "MyUserName") _IEFormElementSetValue($password, "MyPass") ; THIS PART ABOUT BUTTON CLICK I DONT UNDERSTAND AT ALL $sSelector = "body > div:nth-of-type(2) > div > div:nth-of-type(3) > div > table > tbody > tr > td > table > tbody > tr > td > table > tbody > tr:nth-of-type(1) > td > div > div:nth-of-type(1) > form > div:nth-of-type(5) > button" $signInUC = $oIE.document.QuerySelector($sSelector) _IEAction($signInUC, "click") EndFunc ;==>signIn  
      I would be very grateful for any help
    • By adityaparakh
      Hello ,

      A website I am trying to login with my credentials.
      And retrieve the cookie into a text file.
      Unable to do so.
      Is it that certain,  Httponly , type - are not allowed to be fetched.

      Then further ,
      I will be checking every 5 minutes if my session is active , else re-login and re-fetch the cookie.
      For the second part , I will probably fetch some table and see if not in appropriate format do Part 1 : Fetch Cookie - again.
      Any better way , tips would be appreciated.
       
      Thanks
       
    • By Jamestay97
      Hello! Thanks you for looking at my post
      **No source code I'm sorry work related can't copy information**
      I've been using autoit for about 1 year. 
      I'm having trouble automating a click on an internet explorer web page and I've tried a lot of examples from help pages and forums already. The object I'm trying to click on isnt always in the same spot so I can't use mouse click or control click, I have tried to use the different get collection options and clickbyname, or index or get object. I'm just struggling. 
      Description of object I'm trying to click -- 
      HTML Code looks like <a ng-click.. "Click Here" it appears it's just a click able object named "click here" that opens a hidden window by running a script inside the web page. I'm not able to grab the information from the window unless it's open so I have to automate this click somehow. 
       
      I understand it's difficult to assist without having something to look at, I apologize for that sincerely and appreciate and assistance and suggestions. 
    • By aaron832
      Hello everyone. 
      Just wanted to share my Disney Plus automated script in the hopes that others might be able to make improvements to some of the brute force stuff I have done.
      I use this script with google home to request "I want to watch X on Disney Plus."
      Improvements:
      * I would like to be able to choose a profile.
      * Remove keyboard inputs for tabbing to select buttons / shows.
      #include <IE.au3> #include <Constants.au3> #include <Misc.au3> #include "commonfunc.au3" _Singleton("start_playsearchdisney") if Not ($CmdLine[0] >= 1) Then MsgBox(0, "Play Search Netflix", "No paramters... searching Moana") ;Exit 1 EndIf $searchtext = "Moana" if($CmdLine[0] >= 1) Then $searchtext = $CmdLine[1] EndIf CloseAll() TurnOnTV() SetAudioTV() Local $oIE = _IECreate("disneyplus.com/search") If @error Then Exit MsgBox(48, "", "_IECreate() Error", 3) Sleep (5000) ;5 second sleep to make sure everything loads. ;Get the search box element $oForm = _IEGetObjById($oIE, "search-input") if @error Then MsgBox(0, "Play Search Disney Error", "Couldnt get search form.", 5) _IEQuit($oIE) Exit EndIf ;Enter our search result into the field. _IEFormElementSetValue($oForm, $searchtext) ;Submit Send("{ENTER}") ;Brute force select the resulting show. 3 tabs required for IExplorer for some reason. Sleep (2000) Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{ENTER}") Sleep (4000) Send("{TAB}") ;Skip to content Sleep (500) Send("{ENTER}") ;Skip to content enter Send("{ENTER}") ;Play button ;Move the mouse out of the way. MouseMove(500,500)  
      Also, including my netflix script in which I was able to avoid keyboard input for navigation.  Also a profile can be used.
      #include <IE.au3> #include <Constants.au3> #include <Misc.au3> #include "commonfunc.au3" _Singleton("start_playsearchnetflix") if Not ($CmdLine[0] >= 1) Then MsgBox(0, "Play Search Netflix", "Bad number of params: " & $CmdLine[0]) Exit 1 EndIf CloseAll() TurnOnTV() SetAudioTV() Local $profileHash = "xxxxxxxxxxxxxx" if ($CmdLine[0] >= 2) Then Switch $CmdLine[2] Case "User2" $profileHash = "xxxxxxxxxxxxx" Case "User3" $profileHash = "xxxxxxxxxxxxx" EndSwitch EndIf CloseAll() MouseMove(0,0) Local $oIE = _IECreate("www.netflix.com/SwitchProfile?tkn=" & $profileHash) If @error Then Exit MsgBox(48, "", "_IECreate() Error", 3) Sleep (2000) Local $oApp = _IEGetObjById($oIE,"appMountPoint") $oApp.childnodes.item(0).childnodes.item(0).childnodes.item(0).childnodes.item(0).childnodes.item(2).childnodes.item(0).childnodes.item(0).childnodes.item(0) $tags = $oIE.document.GetElementsByTagName("button") For $tag in $tags $class_value = $tag.className If $class_value = "searchTab" Then Local $oSearchBox = $tag ExitLoop EndIf Next if Not ($oSearchBox.className == "searchTab") Then MsgBox(0, "Play Search Netflix Error", "Unable to locate searchTab page element. Did netflix change their site?", 5) _IEQuit($oIE) Exit EndIf _IEAction($oSearchBox, "click") sleep(500) Send($CmdLine[1]) Send("{ENTER}") Sleep (2000) Local $oCard = _IEGetObjById($oIE,"title-card-0-0") if @error Then MsgBox(0, "Play Search Netflix Error", "Sorry, no shows found.", 5) _IEQuit($oIE) Exit EndIf _IENavigate($oIE, $oCard.childnodes.item(0).childnodes.item(0).href) Sleep(5000) MouseMove(500,500)  
    • By FUD
      hello 
      please i need help 
      i need to open link in default browser only one windows without duplicate if i try to open the same link 
       
      thanks 
×
×
  • Create New...