Sign in to follow this  
Followers 0
diikee

how to control a selectable box

4 posts in this topic

#1 ·  Posted (edited)

$lv = _IETagNameGetCollection($oIE, "OBJECT")
For $l in $lv
        
    If ($l.id) = "iq" Then
;_IEFormElementOptionselect($e, "iq", 1, "byText")
        _IEAction($l, "focus")
        
        $iScreenX = _IEPropertyGet($l, "screenx")
        $iScreenY = _IEPropertyGet($l, "screeny")
        $iWidth = _IEPropertyGet($l, "width")
        $iHeight = _IEPropertyGet($l, "height")
        
;MouseMove($iScreenX + $iWidth/2, $iScreenY + $iHeight/2)
        MouseMove($iScreenX, $iScreenY)
        MouseClickDrag("left",$iScreenX, $iScreenY, 200, 300)
        ExitLoop
    EndIf
Next

the drawable box is dotted and want to select on one of the dots and drag it to manipulate its size.

MouseClickDrag("left",$iScreenX, $iScreenY, 200, 300)

this command just drags the mouse from one point to the other but not the box.

how do i accomplish that???

post-34326-1212793072_thumb.jpg

Edited by diikee

Share this post


Link to post
Share on other sites



I would think, using logic here for I've never tackled something like this before, You would need to do the following:

  • Give each of the 8 points a variable name
  • Say point $_point_1, which would be the point in the upper left corner is moved
  • You need to make it so $_point_2 and $_point_3 ( middle and top right points) are on the same "X" axis as $_point_1.
  • $_point_2 would need to check to see if it was halve the distance between $_point_1 and $_point_3. If not, it would correct itself by moving to a equal distance ("Y" axis) between $_point_1 and $_point_3.
  • $_point_4 and $_point_6 (middle left and bottom left) are on the same "Y" axis as $_point_1.
  • $_point_4 would need to check to see if it was halve the distance between $_point_1 and $_point_6. If not, it would correct itself by moving to a equal distance ("X" axis) between $_point_1 and $_point_6.

This would be the logic you would need to make the code. Give it a try and see what you come up with.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

<SPAN id=boxes><IMG onmouseup=BoxMouseUp() onmousemove=BoxMouseMove() onmousedown=BoxMouseDown() style="Z-INDEX: 3; LEFT: 75px; POSITION: absolute; TOP: 112px" height=1 src="http://10.100.47.10/1pixblue.gif" width=274><IMG onmouseup=BoxMouseUp() onmousemove=BoxMouseMove() onmousedown=BoxMouseDown() style="Z-INDEX: 3; LEFT: 75px; POSITION: absolute; TOP: 112px" height=173 src="http://10.100.47.10/1pixblue.gif" width=1><IMG onmouseup=BoxMouseUp() onmousemove=BoxMouseMove() onmousedown=BoxMouseDown() style="Z-INDEX: 3; LEFT: 75px; POSITION: absolute; TOP: 285px" height=1 src="http://10.100.47.10/1pixblue.gif" width=274><IMG onmouseup=BoxMouseUp() onmousemove=BoxMouseMove() onmousedown=BoxMouseDown() style="Z-INDEX: 3; LEFT: 349px; POSITION: absolute; TOP: 112px" height=173 src="http://10.100.47.10/1pixblue.gif" width=1><IMG onmouseup=BoxMouseUp() onmousemove=BoxMouseMove() onmousedown=BoxMouseDown() style="Z-INDEX: 3; LEFT: 343px; POSITION: absolute; TOP: 279px" height=6 src="http://10.100.47.10/1pixblue.gif" width=6><IMG onmouseup=BoxMouseUp() onmousemove=BoxMouseMove() onmousedown=BoxMouseDown() style="Z-INDEX: 3; LEFT: 75px; POSITION: absolute; TOP: 112px" height=6 src="http://10.100.47.10/1pixblue.gif" width=6><IMG onmouseup=BoxMouseUp() onmousemove=BoxMouseMove() onmousedown=BoxMouseDown() style="Z-INDEX: 3; LEFT: 343px; POSITION: absolute; TOP: 112px" height=6 src="http://10.100.47.10/1pixblue.gif" width=6><IMG onmouseup=BoxMouseUp() onmousemove=BoxMouseMove() onmousedown=BoxMouseDown() style="Z-INDEX: 3; LEFT: 75px; POSITION: absolute; TOP: 279px" height=6 src="http://10.100.47.10/1pixblue.gif" width=6><IMG onmouseup=BoxMouseUp() onmousemove=BoxMouseMove() onmousedown=BoxMouseDown() style="Z-INDEX: 3; LEFT: 209px; POSITION: absolute; TOP: 112px" height=6 src="http://10.100.47.10/1pixblue.gif" width=6><IMG onmouseup=BoxMouseUp() onmousemove=BoxMouseMove() onmousedown=BoxMouseDown() style="Z-INDEX: 3; LEFT: 75px; POSITION: absolute; TOP: 196px" height=6 src="http://10.100.47.10/1pixblue.gif" width=6><IMG onmouseup=BoxMouseUp() onmousemove=BoxMouseMove() onmousedown=BoxMouseDown() style="Z-INDEX: 3; LEFT: 343px; POSITION: absolute; TOP: 196px" height=6 src="http://10.100.47.10/1pixblue.gif" width=6><IMG onmouseup=BoxMouseUp() onmousemove=BoxMouseMove() onmousedown=BoxMouseDown() style="Z-INDEX: 3; LEFT: 209px; POSITION: absolute; TOP: 279px" height=6 src="http://10.100.47.10/1pixblue.gif" width=6></SPAN>

this is the code that sets the box itself

Edited by diikee

Share this post


Link to post
Share on other sites

Anyone good with drawing/manipulating boxes??

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  
Followers 0