Madness2008 Posted April 6, 2008 Share Posted April 6, 2008 I am making a script which automates several functions on a website. I can make it all automate by using mouseclick simply enough, and in the past I have background scripted other websites similar, however on this website one of the buttons is an image src and not an input type="button", therefore it does not have a name attribute that I am aware of. I would like to know if there is anyway to click the image without having to use the mouse, so I can fully background automate this script and do other things while it is running. I can provide some source code if anyone thinks they may be able to help me solve this one and needs to see the source to possibly solve this. Many Thanks Madness2008 Link to comment Share on other sites More sharing options...
monoceres Posted April 6, 2008 Share Posted April 6, 2008 (edited) _IEImgClick would do the trick Edited April 6, 2008 by monoceres Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Madness2008 Posted April 6, 2008 Author Share Posted April 6, 2008 can't find anything in the help file about _IEImgClick MY current code for this particular image is :- Func ClickNewfight() Local $oframe = _IEFrameGetObjByName($oie, "toiminta") local $Button = _IEGetObjByid($oframe, "nefb") local $X = _IEPropertyGet($Button, "screenx") local $Y = _IEPropertyGet($Button, "screeny") local $Width = _IEPropertyGet($Button, "width") local $Height = _IEPropertyGet($Button, "height") local $widthA = $X local $WidthB = ($X + $Width - 5) local $heighta = $Y local $heightb = ($Y + $Height-5) local $WidthRange = Random($WidthA, $WidthB, 1) local $HeightRange = Random($HeightA, $HeightB, 1) If $WidthRange + $HeightRange = 0 Then Return 0 MouseClick("left", $WidthRange, $HeightRange, 1, 0) sleep(2000) EndFunc That randomises it to click on a random pixel in range. How would I use _IEImgClick. I cannot find anything in help file to show me an example of it's use. Link to comment Share on other sites More sharing options...
Madness2008 Posted April 6, 2008 Author Share Posted April 6, 2008 Ok I've found some documentation on the _IEImgClick. I have tried using the src partial and full and it doesn't work so I assume I am doing something wrong. _IEImgClick ($oIE, "/images/newf.jpg") Is that incorrectly written or is it just not gonna work for other reasons? Thanks Madness 2008 Link to comment Share on other sites More sharing options...
Madness2008 Posted April 6, 2008 Author Share Posted April 6, 2008 <input type='image' name='newfightbutton' onclick='setTimeout(\"this.disabled=true;\",10);return true;' src='images/newf.jpg' style='cursor: default;'> That's the source for the image I am attempting to click background. Forgot to add it earlier Link to comment Share on other sites More sharing options...
Madness2008 Posted April 6, 2008 Author Share Posted April 6, 2008 ok spoke to a friend who knows au3 well and he said the IEImgClick will not work. He also said he has no idea how to make it work. Any new ideas welcome I would love to solve this problem Link to comment Share on other sites More sharing options...
monoceres Posted April 6, 2008 Share Posted April 6, 2008 Can you post a link to the website, it's easier if you can examine it for yourself Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Madness2008 Posted April 7, 2008 Author Share Posted April 7, 2008 Ok that idea failed Has anyone got any fresh ideas for this one? Link to comment Share on other sites More sharing options...
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