Jump to content
Sign in to follow this  
HiNoTora

==> Object referenced outside a "With" statement.:.........

Recommended Posts

HiNoTora
C:Program Files (x86)AutoIt3IncludeIE.au3 (2191) : ==> Object referenced outside a "With" statement.:
Local $o_head = $o_object.document.all.tags("HEAD").Item(0)
Local $o_head = $o_object.document.all.tags("HEAD")^ ERROR
 
 
#include <GUIConstantsEx.au3>
#include <EditConstants.au3>
#include <GUIEdit.au3>
#include <ScrollBarConstants.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <GuiMenu.au3>
#include <WinAPI.au3>
#Include <Misc.au3>
Opt("GUIOnEventMode", 1)


_IEErrorHandlerRegister()
Global $oIE1 = _IECreateEmbedded(), $oIE2 = _IECreateEmbedded(), $oIE3 = _IECreateEmbedded()
Global $hGUI = GUICreate("LIVE FOREX SIGNALS", 600, 461, -1, -1, -1, $WS_EX_TOPMOST)
GUICtrlCreateObj($oIE1, -90, 1, 740, 150)
GUICtrlCreateObj($oIE2, 1, 150, 740, 100)
GUICtrlCreateObj($oIE3, 1, 250, 740, 150)
GUISetState()
GUISetOnEvent($GUI_EVENT_CLOSE, "Terminate")
GUISetState(@SW_SHOW, $hGUI)
Global $hButton = GUICtrlCreateButton("Made BY: Dersiniar - dersiniar@gmail.com", 30, 400, 510, 60)
GUICtrlSetColor(-1, 0xFF68000)
GUICtrlSetFont(-1, 15, 800, 0, "Comic Sans Ms")



_IEHeadInsertEventScript($oIE1, "document", "oncontextmenu", "alert('No Context Menu');return false")
_IEHeadInsertEventScript($oIE2, "document", "oncontextmenu", "alert('No Context Menu');return false")
_IEHeadInsertEventScript($oIE3, "document", "oncontextmenu", "alert('No Context Menu');return false")

_IENavigate($oIE1, "http://fxsignals.fxmarketleaders.com/ClosedNG.aspx")
_IELoadWait($oIE1, 2000)
_IENavigate($oIE2, "http://fxsignals.fxmarketleaders.com/Longsignalsng.aspx")
_IELoadWait($oIE2, 2000)
_IENavigate($oIE3, "http://fxsignals.fxmarketleaders.com/shortsignalsng.aspx")
_IELoadWait($oIE3, 2000)

 While 1
   _IEAction($oIE1, "refresh")
   Sleep(4500)
   _IEAction($oIE2, "refresh")
    Sleep(4500)
   _IEAction($oIE3, "refresh")   
    Sleep(4500)
    
    
    
 wend
 

Func Terminate()
    Exit
 EndFunc   ;==>Terminate

 

Share this post


Link to post
Share on other sites
abberration

I think you need to load the pages before looking for javascript elements on the page.

Move the 6 lines with_IENavigate & _IELoadWait to above the 3 lines with _IEHeadInsertEventScript.


RAID Calculator | Software Installer

The truth has been suppressed since the dawn of time.

Share this post


Link to post
Share on other sites
DaleHohm

The above looks like good advice. The error is caused by a race condition that is fixed in the beta version of AutoIt.

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

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  

×