Jump to content

Image scripting


Recommended Posts

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

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

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

<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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...