Jump to content
Sign in to follow this  
diikee

drawing a virtual box

Recommended Posts

diikee

<SPAN id=boxes>

<IMG

onmouseup=BoxMouseUp()

onmousemove=BoxMouseMove()

onmousedown=BoxMouseDown()

style="Z-INDEX: 3; LEFT: 80px; POSITION: absolute; TOP: 129px" height=1 src="http://10.100.47.2/1pixblue.gif" width=250>

$ew = _IETagNameGetCollection($oIE, "IMG")
For $e in $ew
        
    If ($e.src) = "http://10.100.47.24/1pixblue.gif" Then
        _IEAction($e, "focus")
        
        $iScreenX = _IEPropertyGet($e, "screenx")
        $iScreenY = _IEPropertyGet($e, "screeny")
        $iWidth = _IEPropertyGet($e, "width")
        $iHeight = _IEPropertyGet($e, "height")
        
    ;MouseMove($iScreenX + $iWidth/2, $iScreenY + $iHeight/2)
        MouseMove($iScreenX, $iScreenY)
        
        MouseClickDrag("left",$iScreenX, $iScreenY, $iScreenX+100, $iScreenY+160)
        
        ExitLoop
    EndIf
Next

this script goes to the field of view window and tries to draw a box by click and drag. The mouse finds the coordinates and moves to the specified position but never draws the intended box.

see attached jpg----trying to control the blue box.

how can I accomplish that??

post-34326-1216685212_thumb.jpg

Share this post


Link to post
Share on other sites
diikee

Anyone able to tackle this problem??

Share this post


Link to post
Share on other sites
Clipper34

i'm guessing you could use timed intervals for the mouse clicks instead all at once, Hope that helps Clipper34.

Share this post


Link to post
Share on other sites
diikee

do you have an example??

Share this post


Link to post
Share on other sites
Clipper34

Yup, i just made it. Open paint and it will draw a box for you. Hope that helps, Clipper34.

WinWaitActive("Paint")
Sleep(3000)
MouseClickDrag("left", 146, 232, 555, 245, 5)
Sleep(1000)
MouseClickDrag("left", 555, 245, 562, 460, 5)
Sleep(500)
MouseClickDrag("left", 562, 460, 147, 436, 5)
Sleep(1000)
MouseClickDrag("left", 149, 435, 147, 234, 5)

Share this post


Link to post
Share on other sites
diikee

Clipper34,

thanks for all the help. Yes it draws the box just by dragging it once.

I was referencing the wrong TAG, ---> one level down of the proper tag.

Share this post


Link to post
Share on other sites
spudw2k

Here's a start to this task. I got a rough "highlight" portion implemented. It's leaves trails though so can be dirty. Not a bad start though.

http://www.autoitscript.com/forum/index.ph...st&p=572301

Edited by spudw2k

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  

×