Wesloth Posted November 28, 2007 Share Posted November 28, 2007 (edited) Well, i wrote a function to login in the browsergame www.ogame.de Func Login($universe,$user,$pass) If $universe="Universum auswählen" Then MsgBox(0,"OBot","Universum auswählen!") Return 0 EndIf $universe = Int($universe) Local $oIE = _IECreate("Ogame.de") Local $oHWND = _IEPropertyGet($oIE, "hwnd") WinSetState ($oHWND, "", @SW_MAXIMIZE ) Local $oFrameMain = _IEFrameGetObjByName ($oIE, "mainframe") Local $oForm = _IEFormGetObjByName($oFrameMain,"loginForm") Local $oElement_1 = _IEFormElementGetObjByName($oForm,"login") Local $oElement_2 = _IEFormElementGetObjByName($oForm,"pass") Local $oElement_3 = _IEFormElementGetObjByName($oForm,"universe") _IEFormElementSetValue($oElement_1,$user) _IEFormElementSetValue($oElement_2,$pass) _IEFormElementSetValue($oElement_3,"uni" & $universe & ".ogame.de") _IEFormImageClick($oFrameMain,'button','name') EndFunc Till this point all works fine. But now i am in the game and i want to click a link named "Technik". So i thought _IELinkClickByText($oIE,"Technik") But no, nothing happens and i get some errors. --> IE.au3 V2.3-1 Warning from function _IELoadWait, $_IEStatus_AccessIsDenied (Cannot verify readyState. Likely casue: cross-site scripting security restriction.) --> IE.au3 V2.3-1 Warning from function _IELinkClickByText, $_IEStatus_NoMatch I am a bit afraid of this message: $_IEStatus_AccessIsDenied I noticed that, after login, that i am still in a frame (name:"mainframe"). So i thought _IELinkClickByText($oFrameMain,"Technik") But again i only get errors from the IE.au3 (The requested action with this object has failed.) and the scripts chrashed >_> I think the problem is this message: $_IEStatus_AccessIsDenied Well, some help would be nice Sorry for my english Edited November 28, 2007 by Wesloth Link to comment Share on other sites More sharing options...
DaleHohm Posted November 28, 2007 Share Posted November 28, 2007 It is not really clear what function calls result in the errors you are receiving. It is important to figure that out. Use Debug statements of SciTe Trace Lines if you need to. The access is denied error is typically caused by trying to operate on a frame whose source is from a different domain than its parent -- if this is the case, your only option is to open the src of that frame in a new browser window. 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 More sharing options...
DelStone Posted February 22, 2012 Share Posted February 22, 2012 The access is denied error is typically caused by trying to operate on a frame whose source is from a different domain than its parentHow can you tell programmatically if the domain is different Dale? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 22, 2012 Moderators Share Posted February 22, 2012 delstone,Please do not necro threads from over 4 years ago - just start a new thread. Autoit has typically advanced a great deal since the original post and there is often little relevance to the posted code. Furthermore the current Forum Rules do not permit the discussion of site log-in and automating games - so the thread is now being locked anyway. M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts