Sign in to follow this  
Followers 0
anilmanyam

Problem with _IEpropertyget with browserx property

4 posts in this topic

#1 ·  Posted (edited)

I am trying to get the top left coordinates of the screen in order to use the mouseclick function.

following is the script:

#include <IE.au3>

$ie = _IECreate("")

_IENavigate($ie,"http://darpan")

WinSetState("[CLASS:IEFrame]", "", @SW_MAXIMIZE)

$x = _IEPropertyGet($ie,"browserx")

$y = _IEPropertyGet($ie,"browsery")

MsgBox(0,"",$x & " " & $y)

But i am getting the error :

"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "D:\SPPC\Performance\Scripts\click_bu_coordinates.au3"

C:\Program Files\AutoIt3\Include\IE.au3 (2579) : ==> The requested action with this object has failed.:

$iTemp += $oTemp.offsetLeft

$iTemp += $oTemp.offsetLeft^ ERROR>

Exit code: 1 Time: 5.166

Can anyone tell me what's the problem

Edited by anilmanyam

Share this post


Link to post
Share on other sites



I'm surprised it is getting that far - it should fail with InvalidObjectType because you need to pass an HTML (DOM) element to this, not the browser pointer. What version of IE are you using?

I think what you want is screenx and screeny

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

I'm surprised it is getting that far - it should fail with InvalidObjectType because you need to pass an HTML (DOM) element to this, not the browser pointer. What version of IE are you using?

I think what you want is screenx and screeny

Dale

Dale,

I am using IE 8. I need to use mouseclick to click on a link on the browser regardless of size of window and situation where user has installed some random toolbars with internet explorer. Mouse click takes the actual screen coordinates as x and y coordinates.

What do i need to do in order to get the coordinates relative to the actual top-left location on the browser from where the webpage starts.

Share this post


Link to post
Share on other sites

Is it an HTML page or some sort of Flash or Java applet? If it is HTML, then there are much better ways to do this that do not rely on screen or browser layout (_IELinkClickByText, _IEAction click, etc).

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  
Followers 0