Jump to content

Question about IE automate


AutID
 Share

Recommended Posts

Hello,

Is it possible to make a script that will navigate a site and auto login without using IE functions???

For example a script that will navigate this forum and will log me.

I already did it creating object("InternetExplorer.Application"), same as IE, but I was wondering if is there an other way to do it without using IE objects.

Cheers

Link to comment
Share on other sites

Forum Rules prohibit discussing auto login to sites:

 
1. Do not ask for help with AutoIt scripts, post links to, or start discussion topics on the following subjects:

  • Malware of any form - trojan, virus, keylogger, spam tool, "joke/spoof" script, etc.
  • Bypassing of security measures - log-in and security dialogs, CAPTCHAs, anti-bot agents, software activation, etc.
  • Automation of software/sites contrary to their EULA (see Reporting bullet below).
  • Launching, automation or script interaction with games or game servers, regardless of the game.
  • Running or injecting any code (in any form) intended to alter the original functionality of another process.
  • Decompilation of AutoIt scripts or details of decompiler software.

This list is non-exhaustive - the Moderating team reserve the right to close any thread that they feel is contrary to the ethos of the forum.

Link to comment
Share on other sites

Forum Rules prohibit discussing auto login to sites:

 

1. Do not ask for help with AutoIt scripts, post links to, or start discussion topics on the following subjects:

  • Malware of any form - trojan, virus, keylogger, spam tool, "joke/spoof" script, etc.
  • Bypassing of security measures - log-in and security dialogs, CAPTCHAs, anti-bot agents, software activation, etc.
  • Automation of software/sites contrary to their EULA (see Reporting bullet below).
  • Launching, automation or script interaction with games or game servers, regardless of the game.
  • Running or injecting any code (in any form) intended to alter the original functionality of another process.
  • Decompilation of AutoIt scripts or details of decompiler software.
This list is non-exhaustive - the Moderating team reserve the right to close any thread that they feel is contrary to the ethos of the forum.

What are you talking about? Please be serious. Auto log in on web site is allowed. I am not bypassing any kind of security or captcha. It is a regular log in as in this forum. I am just asking if it possible to do it in another way.

If you want some attention get a pet.

Link to comment
Share on other sites

Maybe a better way to ask is this:

Are you wanting to make your script work on any browser? If yes, why? Is it not for just you?

I'm now asking for if you don't like doing it with IE which works fine, then saying you want it "better" is very vague.

In short - why do you need it better? What is the shortcoming with using IE?

Link to comment
Share on other sites

Ok, using ie objects, creating an IE, navigating it, filling the forms, clicking on buttons for log in etc etc..... takes a lot of time. IE browser can be very slow even if my connection is more than 100mb.
IELoadWait uses sleep for the delay and it gets the state of the browser. The browser fires complete even if the display isn't finish yet. Script then goes to next line and returns error. It doesn't happen everytime but it is not safe.
That's why I was wondering if it is possible to do it in another way. Something safer.

 

Link to comment
Share on other sites

Ok, makes sense in what your asking. Maybe the best way to fix your problem is to look at your code and see if it could be tweaked so that it is more stable. I'm not the best at this sort of thing but there are many here who are better than me at solving this one.

Another suggested method maybe to pass all the information you are populating the form with in the URL string. I do that for a few forms and it does speed it up a bit. You have to be careful with special characters such as "@" when using the URL method and how long the URL string is.

Also this method doesn't always work due to the design of the webpage in question.

Edited by YogiBear
Link to comment
Share on other sites

...IELoadWait uses sleep for the delay and it gets the state of the browser. The browser fires complete even if the display isn't finish yet. Script then goes to next line and returns error. It doesn't happen everytime but it is not safe...

 

 

_IELoadWait uses a 100 ms polling loop waiting for the browser readystate to change to 4 or "complete".  This in no way makes it "not safe".  The fact is that _IELoadWait does not do what you want it to do.  In fact, no generic client-side mechanism can do what you are expecting.  There is no state of "I'm executing asynchronous communication, wait till I'm done before you do anything else".  _IELoadWait pays attention to browser readystate and if the flow of your website allows it to change to complete before you want it to, you'll need to employ other means to examine the page content to see if it is "done", by your definition.  For example, look for certain elements to be created, values to be filled in etc, before moving on.

Dale

Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

_IELoadWait uses a 100 ms polling loop waiting for the browser readystate to change to 4 or "complete".  This in no way makes it "not safe".  The fact is that _IELoadWait does not do what you want it to do.  In fact, no generic client-side mechanism can do what you are expecting.  There is no state of "I'm executing asynchronous communication, wait till I'm done before you do anything else".  _IELoadWait pays attention to browser readystate and if the flow of your website allows it to change to complete before you want it to, you'll need to employ other means to examine the page content to see if it is "done", by your definition.  For example, look for certain elements to be created, values to be filled in etc, before moving on.

 

Dale

I know that Dale, I know what IELoadWait does. And it does pretty well it's job. I am not saying it is not good, don't feel offended. But the problem is that the browser fires readyState complete or 4 depending on my speed. The display of the web page takes much more longer that the internet speed even if it's visibility is set to 0. That's why I can't synchronize ieloadwait with display.

Getting an element and waiting to be created with sleep is what I am doing now. It is very slow though.

Link to comment
Share on other sites

I'm not offended, I simply don't want the forum littered with misinformation (or something that can be easily misinterpreted).

If you are saying that it is the page layout engine that is slowing you down, then look at WINHTTP.  Otherwise, the data is the data and it takes as long to get there as it takes.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

  • Moderators

Hi,

Can I make clear once again that there is no prohibition on discussing plain vanilla site logins. As the rules state clearly (and it was even quoted above) we do not want discussion on the automation of security and login dialogs which popup to allow specific actions. :)

Now I will start counting the days until the next time I have to restate this. I thought the Forum rules in their latest ieration of 23 Nov 12 were quite clear - but it seems some people have still not yet read them and rely on threads which were locked under previous versions. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I know that Dale, I know what IELoadWait does. And it does pretty well it's job. I am not saying it is not good, don't feel offended. But the problem is that the browser fires readyState complete or 4 depending on my speed. The display of the web page takes much more longer that the internet speed even if it's visibility is set to 0. That's why I can't synchronize ieloadwait with display.

Getting an element and waiting to be created with sleep is what I am doing now. It is very slow though.

I ran into this problem with a webpage that I had to loop about 2000 times. What I did to make it more stable was to do a pixel search on the control I needed to click when sending to verify the page had rendered completely along with IELoadWait. Clunky yes, but it helped a bunch.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...