anilmanyam 0 Posted April 5, 2011 (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.166Can anyone tell me what's the problem Edited April 5, 2011 by anilmanyam Share this post Link to post Share on other sites
DaleHohm 65 Posted April 5, 2011 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, curlMSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object modelAutomate input type=file (Related)Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better?IE.au3 issues with Vista - WorkaroundsSciTe 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
anilmanyam 0 Posted April 6, 2011 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 screenyDaleDale,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
DaleHohm 65 Posted April 6, 2011 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, curlMSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object modelAutomate input type=file (Related)Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better?IE.au3 issues with Vista - WorkaroundsSciTe 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