Jump to content

Not able to access some website to automate them - (Moved)


Recommended Posts

I am really a new user to AutoIt and I was trying to do some automation over a website which is not being loaded using AutoIt. I saw that I'm having similar error when I'm trying to access twitter.

Here is the code which I was running. 

#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$var = 0
HotKeySet("{ESC}", "Terminate")

;Create Main GUI
$Main = GUICreate("Main",1024,600,-1,-1,-1,-1)
GUISetState(@SW_SHOW, $Main)

;Create browser window inside GUI
Local $oIE = ObjCreate("Shell.Explorer.2")
GUICtrlCreateObj($oIE, 5, 5, 1014, 600)

;
While 1
    Sleep(300)
        If $var = 0 Then
            $var = 1
            _GoTo_Twitter()
        EndIf
WEnd

;Functions
Func _GoTo_Twitter()
    $oIE.navigate("https://twitter.com")
EndFunc

Func Terminate()
    Exit
EndFunc

Any help would be appreciate. 
Thanks.

Link to comment
Share on other sites

  • Developers

Moved to the appropriate forum, as the Developer General Discussion forum very clearly states:

Quote

General development and scripting discussions.


Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums.

Moderation Team

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

28 minutes ago, Danp2 said:

Have you tried using the functions from the IE UDF? See here for the list of available functions.

I tried using something like this,

Local $oIE_iframe = _IE_Example("iframe")
Local $oFrame = _IEFrameGetObjByName($oIE_iframe, "iFrameOne")
_IEBodyWriteHTML($oFrame, "Hello <b><font color=red>iFrame!</font></b>")

But I still can't put the website into that iFrame as I couldn't find any function to set the "src" property of iFrame.

Link to comment
Share on other sites

Sorry, but not sure what this --

Quote

But I still can't put the website into that iFrame as I couldn't find any function to set the "src" property of iFrame

has to do with your original issue --

Quote

I was trying to do some automation over a website which is not being loaded using AutoIt

Looking back at the code you posted, it looks like you are trying to embed a web browser in your GUI. If so, you may want to look at the function _IECreateEmbedded.

Also would be good to review this info --

 

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...