JohnOne Posted January 8, 2011 Posted January 8, 2011 (edited) Im trying to scroll to an object on a page, my problem is that the page size is dynamic depending on the ads on it at any one time.Because of this I cannot be precise enough using $oIE.document.parentwindow.scroll(0, $Y)If I use$obj = _IEGetObjById($oIE,"objid") $obj.scrollintoview()It dosent scroll far enough as I need it to scroll Y amount of pixel further.So my question is, how can I find the XY pos of the object, given that I have its ID?I hope thats clear, I had a look through dales IE udfs (which Im only just becoming familiar with), and found _IEPropertyGet()Using$obj = _IEGetObjById($oIE,"objid") $y = _IEPropertyGet($obj,"top")gives me IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidObjectTypeAny pointers thankfully recieved. Edited January 8, 2011 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
PsaltyDS Posted January 8, 2011 Posted January 8, 2011 You flagged the title "[solved]", but didn't say what you did. This would be one possibility: The X/Y scroll of the page can be set directly in pixels. Something like this: $oIE.document.parentwindow.scroll($iX, $iY) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
JohnOne Posted January 8, 2011 Author Posted January 8, 2011 Opps, sorry. I couldnt do that, I explained that but not very well (because the object was dynamically placed on the page with adverts determining where it was. I had tried $obj = _IEGetObjById($oIE,"objid") $y = _IEPropertyGet($obj,"top") In the end it was $y = _IEPropertyGet($obj, "screeny") which I needed and could figure the rest out from that. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now